<%@ Page Title="" Language="C#" MasterPageFile="~/MasterCar.master" AutoEventWireup="true"
    EnableEventValidation="false" CodeFile="car-quote-results.aspx.cs" Inherits="car_insurance_car_quote_results"
    Async="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script src="/js/vendor/jquery-1.10.1.min.js" type="text/javascript"></script>

    <!--Modernizr -->

    <script src="/js/vendor/modernizr.custom.71422.js" type="text/javascript"></script>

    <!--Push JS -->

    <script src="/js/push-menu.min.js" type="text/javascript"></script>

    <!-- Facebook Conversion Code for GG Customers -->

    <script type="text/javascript">
        (function() {
            var _fbq = window._fbq || (window._fbq = []);
            if (!_fbq.loaded) {
                var fbds = document.createElement('script');
                fbds.async = true;
                fbds.src = '//connect.facebook.net/en_US/fbds.js';
                var s = document.getElementsByTagName('script')[0];
                s.parentNode.insertBefore(fbds, s);
                _fbq.loaded = true;
            }
        })();
        window._fbq = window._fbq || [];
        window._fbq.push(['track', '6014983617962', { 'value': '0.00', 'currency': 'USD'}]);
    </script>

    <noscript>
        <img height="1" width="1" alt="" style="display: none" src="https://www.facebook.com/tr?ev=6014983617962&amp;cd[value]=0.00&amp;cd[currency]=USD&amp;noscript=1" /></noscript>
    <!--Facebook Conversion Code for GG Leads-->

    <script type="text/javascript">
        var fb_param = {};
        fb_param.pixel_id = '6012661234728';
        fb_param.value = '0.01';
        fb_param.currency = 'USD';
        (function() {
            var fpw = document.createElement('script');
            fpw.async = true;
            fpw.src = '//connect.facebook.net/en_US/fp.js';
            var ref = document.getElementsByTagName('script')[0];
            ref.parentNode.insertBefore(fpw, ref);
        })();
    
    </script>

    <noscript>
        <img height="1" width="1" alt="" style="display: none" src="https://www.facebook.com/offsite_event.php?id=6012661234728&amp;value=0.01&amp;currency=USD" /></noscript>
        <script type="text/javascript">
            setTimeout(function() {
                var a = document.createElement("script");
                var b = document.getElementsByTagName("script")[0];
                a.src = document.location.protocol + "//script.crazyegg.com/pages/scripts/0030/4575.js?" + Math.floor(new Date().getTime() / 3600000);
                a.async = true; a.type = "text/javascript"; b.parentNode.insertBefore(a, b)
            }, 1);
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpHeader" runat="Server">
    <!--Google Code for Results Page Conversion Page-->
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpBody" runat="Server">
    <asp:Label ID="lblAdvertiser" runat="server"></asp:Label>
    <asp:HiddenField runat="server" ID="hdnIsPromo" Value="0" />
    <div id="divFormSelection" style="display: none" runat="server">
        <asp:Label ID="lblProvider" runat="server"></asp:Label>
        <asp:Label ID="lblCarMakeCode" runat="server"></asp:Label>
        <asp:Label ID="lblCarMakeName" runat="server"></asp:Label>
        <asp:Label ID="lblCarModelFamilyName" runat="server"></asp:Label>
        <asp:Label runat="server" ID="Label5" Text="<%$Resources:CarInsurance,NCB%>" Visible="false" />
        <asp:Label ID="lblNCBvalueTop" runat="server" Visible="false" />
        <div style="text-align: left; display: none;">
            <asp:HyperLink ID="hplCarDetails" NavigateUrl="default.aspx" runat="server">
                <asp:Label runat="server" ID="lblCarInsuranceDetails" Text="<%$Resources:CarInsurance,CarInsuranceDetails %>" /></asp:HyperLink><asp:HyperLink
                    ID="hplProfile" NavigateUrl="profile.aspx" runat="server">
                    <asp:Label runat="server" ID="lblProfile" Text="<%$Resources:CarInsurance,Profile %>" /></asp:HyperLink><asp:HyperLink
                        ID="hplCarResults" NavigateUrl="#" runat="server">
                        <asp:Label runat="server" ID="lblQuoteResults" Text="<%$Resources:CarInsurance,QuoteResults %>" /></asp:HyperLink></div>
        <div id="divSummaryBox" runat="server">
            <%=GetGlobalResourceObject("CarInsurance", "QuoteSummary")%>
            <%=GetGlobalResourceObject("CarInsurance", "CarModelYear")%>
            <asp:Label ID="lblYrofManufacture" runat="server"></asp:Label><%= GetGlobalResourceObject("CarInsurance", "CarMakeModel")%>
            <asp:Label ID="lblCarMakemodel" runat="server"></asp:Label></div>
    </div>
    <div class="container top30">
        <div class="bottom-10">
            <table width="996" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td width="560">
                        <asp:Image ID="imgStep" runat="server" ImageUrl="<%$ Resources:ImageResource,ImgStep2Url%>"
                            Width="412" Height="123" alt="" />
                    </td>
                    <td align="right" valign="bottom">
                        <input type="button" name="btn2" class="action-button" value="<%=GetGlobalResourceObject("CarInsurance", "QuoteSummaryDisplay")%>"
                            onclick="ShowHideDiv('divQuoteSummary',true);ShowHideDiv('divEditQuotes',false);" />
                    </td>
                    <td valign="bottom">
                        <input type="button" name="btn" class="action-button" value="<%=GetGlobalResourceObject("General", "EditQuote")%>"
                            onclick="ShowHideDiv('divEditQuotes',true);ShowHideDiv('divQuoteSummary',false);" />
                    </td>
                    <td valign="bottom">
                        <asp:Button ID="btnRunNewQuote" runat="server" CssClass="action-button" Text="<%$ Resources:CarInsurance,RunNewQuotes%>"
                            OnClick="btnRunNewQuote_Click" OnClientClick="return LeaveConfirm();" />
                    </td>
                </tr>
            </table>
        </div>
        <div id="divQuoteSummary" style="display: none;">
            <div class="radius-box-search" id="divQSDisplay">
                <table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="130">
                            <strong>
                                <asp:Label runat="server" ID="Label8" Text="<%$Resources:CarInsurance,CarModelYear%>" /></strong>
                        </td>
                        <td width="50">
                            <asp:Label ID="lblYrofManTop" runat="server" />
                        </td>
                        <td width="150">
                            <strong>
                                <asp:Label runat="server" ID="Label9" Text="<%$Resources:CarInsurance,CarMakeModel%>" /></strong>
                        </td>
                        <td width="600">
                            <asp:Label ID="lblCarMakemodelTop" runat="server" />
                        </td>
                        <td style="width: 30; vertical-align: right;">
                            <img src="/images/closed.png" width="24" height="24" alt="" onclick="ShowHideDiv('divQuoteSummary',false);" />
                        </td>
                    </tr>
                    <tr>
                        <td height="40" colspan="4" valign="center" style="font-weight: bold; color: #4F4356;
                            font-size: 15px;">
                            <%=GetGlobalResourceObject("General", "AssumptionsValues")%>
                        </td>
                    </tr>
                </table>
                <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                    <ContentTemplate>
                        <table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                                <td style="vertical-align: top; padding-top: 20px;">
                                    <table width="480" border="0" cellpadding="0" cellspacing="0">
                                        <tr style="vertical-align: top;">
                                            <td width="200" height="40" style="font-weight: normal; font-size: 13px;">
                                                <strong>
                                                    <asp:Label runat="server" ID="LabelInsType" Text="<%$Resources:CarInsurance,InsuranceType%>" />:
                                                </strong>
                                            </td>
                                            <td width="270">
                                                <div style="font-size: 13px">
                                                    <asp:Label ID="lblInsuranceType" runat="server" /></div>
                                                <div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr runat="server" id="trGarageType" style="vertical-align: top;">
                                            <td width="200" height="40" style="font-weight: normal; font-size: 13px;">
                                                <strong>
                                                    <asp:Label runat="server" ID="Label10" Text="<%$Resources:CarInsurance,GarageType%>" />:
                                                </strong>
                                            </td>
                                            <td>
                                                <div style="font-size: 13px">
                                                    <asp:Label ID="lblGarageType" runat="server" /></div>
                                                <div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr runat="server" id="trDeductible" style="vertical-align: top;">
                                            <td width="200" height="40" style="font-weight: normal; font-size: 13px;">
                                                <strong>
                                                    <asp:Label runat="server" ID="Label3" Text="<%$Resources:CarInsurance,DEC%>" />:
                                                </strong>
                                            </td>
                                            <td width="270">
                                                <div style="font-size: 13px">
                                                    <asp:Label ID="lblDeductible" runat="server" /></div>
                                                <div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr runat="server" id="trIncludeCTPL" style="vertical-align: top;">
                                            <td width="200" height="40" style="font-weight: normal; font-size: 13px;">
                                                <strong>
                                                    <asp:Label runat="server" ID="Label4" Text="<%$Resources:CarInsurance,IncludeCMI%>" />:
                                                </strong>
                                            </td>
                                            <td>
                                                <div style="font-size: 13px">
                                                    <asp:Label ID="lblIncludeCTPL" runat="server" /></div>
                                                <div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr runat="server" id="trAnyClaimLastYear" style="vertical-align: top;">
                                            <td width="200" height="40" style="font-weight: normal; font-size: 13px;">
                                                <strong>
                                                    <asp:Label runat="server" ID="Label13" Text="<%$Resources:CarInsurance,AnyClaimLastYear%>" />:
                                                </strong>
                                            </td>
                                            <td>
                                                <div style="font-size: 13px">
                                                    <asp:Label ID="lblAnyClaimLastYear" runat="server" /></div>
                                                <div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr runat="server" id="trAnyModification" style="vertical-align: top;">
                                            <td width="200" height="40" style="font-weight: normal; font-size: 13px;">
                                                <strong>
                                                    <asp:Label runat="server" ID="Label14" Text="<%$Resources:CarInsurance,AccessaryAndModification%>" />:
                                                </strong>
                                            </td>
                                            <td>
                                                <div style="font-size: 13px">
                                                    <asp:Label ID="lblAnyModification" runat="server" /></div>
                                                <div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr runat="server" id="trModificationAmount" style="vertical-align: top;">
                                            <td width="200" height="40" style="font-weight: normal; font-size: 13px;">
                                                <strong>
                                                    <asp:Label runat="server" ID="Label16" Text="<%$Resources:CarInsurance,AccessaryAndModificationAmount%>" />:
                                                </strong>
                                            </td>
                                            <td>
                                                <div style="font-size: 13px">
                                                    <asp:Label ID="lblModificationAmount" runat="server" /></div>
                                                <div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr runat="server" id="trCommencementDate" style="vertical-align: top; display: none;">
                                            <td width="200" height="40" style="font-weight: normal; font-size: 13px;">
                                                <strong>
                                                    <asp:Label runat="server" ID="Label11" Text="<%$Resources:CarInsurance,CommencementDate%>" />:
                                                </strong>
                                            </td>
                                            <td>
                                                <div style="font-size: 13px">
                                                    <asp:Label ID="lblCommencementDate" runat="server" /></div>
                                                <div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr runat="server" id="trProvinceofRegistration" style="vertical-align: top;">
                                            <td width="200" height="40" style="font-weight: normal; font-size: 13px;">
                                                <strong>
                                                    <asp:Label runat="server" ID="Label12" Text="<%$Resources:CarInsurance,ProvinceofRegistration%>" />:
                                                </strong>
                                            </td>
                                            <td>
                                                <div style="font-size: 13px">
                                                    <asp:Label ID="lblProvinceofRegistration" runat="server" /></div>
                                                <div>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td width="10">
                                </td>
                                <td style="vertical-align: top;">
                                    <table width="480" border="0" cellpadding="0" cellspacing="0">
                                        <div style="padding-top: 10px;">
                                            <%--<img src="/images/elephant-dog.jpg" width="428" height="165" alt="" />--%>
                                        </div>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
        </div>
        <div id="divEditQuotes" style="display: none;">
            <div class="radius-box-search" id="divEQDisplay">
                <table width="960" border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="130">
                            <strong>
                                <asp:Label runat="server" ID="Label15" Text="<%$Resources:CarInsurance,CarModelYear%>" /></strong>
                        </td>
                        <td width="50">
                            <asp:Label ID="lblCarYearEdit" runat="server" />
                        </td>
                        <td width="150">
                            <strong>
                                <asp:Label runat="server" ID="Label18" Text="<%$Resources:CarInsurance,CarMakeModel%>" /></strong>
                        </td>
                        <td width="600">
                            <asp:Label ID="lblCarModelEdit" runat="server" />
                        </td>
                        <td style="width: 30; vertical-align: right;">
                            <img src="/images/closed.png" width="24" height="24" alt="" onclick="ShowHideDiv('divEditQuotes',false);" />
                        </td>
                    </tr>
                    <tr>
                        <td height="40" colspan="4" valign="center" style="font-weight: bold; color: #4F4356;
                            font-size: 15px;">
                            <%=GetGlobalResourceObject("CarInsuranceResultPage", "EditAssumptions")%>
                        </td>
                    </tr>
                </table>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <div class="control-col-1">
                            <div id="divInsuranceType">
                                <div class="column-1">
                                    <strong style="font-size: 13px;">
                                        <asp:Label runat="server" ID="Label20" Text="<%$Resources:CarInsurance,InsuranceType%>" />:
                                    </strong>
                                </div>
                                <asp:UpdatePanel ID="uplInsuranceType" runat="server">
                                    <ContentTemplate>
                                        <div class="column-2">
                                            <div style="font-size: 13px">
                                                <asp:DropDownList ID="ddlInsuranceType" runat="server" CssClass="assumption-field"
                                                    Width="250" onchange="ClearChkCompareHid();ControlVisibleOnOff();" AutoPostBack="true" OnSelectedIndexChanged="ddlInsuranceType_SelectedIndexChanged">
                                                    <asp:ListItem Value="0" Text="<%$ Resources:General,All%>" />
                                                    <asp:ListItem Value="10" Text="<%$ Resources:CarInsurance,Insurance_ClassOne%>" />
                                                    <asp:ListItem Value="21" Text="<%$ Resources:CarInsurance,Insurance_ClassTwoPlus%>" />
                                                    <asp:ListItem Value="31" Text="<%$ Resources:CarInsurance,Insurance_ClassThreePlus%>" />
                                                    <asp:ListItem Value="30" Text="<%$ Resources:CarInsurance,Insurance_ClassThree%>" />
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator CssClass="validationError" ID="rfvInsuranceType" ControlToValidate="ddlInsuranceType"
                                                    InitialValue="-1" runat="server" ErrorMessage="" Text="" ValidationGroup="cardetails"></asp:RequiredFieldValidator></div>
                                        </div>
                                        <div class="column-3">
                                            <%-- <asp:UpdateProgress AssociatedUpdatePanelID="uplInsuranceType" ID="updateProgress1"
                                                DynamicLayout="false" DisplayAfter="0" runat="server">
                                                <ProgressTemplate>
                                                    <img alt="Loading" src="/images/loader/loader.gif" width="25" height="25" /></ProgressTemplate>
                                            </asp:UpdateProgress>--%>
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </div>
                            <div id="divGarageType" runat="server">
                                <div class="column-1">
                                    <strong style="font-size: 13px;">
                                        <asp:Label runat="server" ID="Label22" Text="<%$Resources:CarInsurance,GarageType%>" />:
                                    </strong>
                                </div>
                                <div class="column-2">
                                    <asp:DropDownList ID="ddlGarageType" runat="server" CssClass="assumption-field" Width="250">
                                        <asp:ListItem Value="-1" Text="<%$ Resources:CarInsurance,Select%>" />
                                        <asp:ListItem Value="1" Selected="True" Text="<%$ Resources:CarInsurance,Garage_Authorized%>" />
                                        <asp:ListItem Value="2" Text="<%$ Resources:CarInsurance,Garage_Dealer%>" />
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator CssClass="validationError" ID="rfvGarageType" ControlToValidate="ddlGarageType"
                                        InitialValue="-1" runat="server" ErrorMessage="" Text="" ValidationGroup="cardetails"></asp:RequiredFieldValidator></div>
                                <div class="column-3">
                                </div>
                            </div>
                            <div id="divDeduct" runat="server">
                                <div class="column-1">
                                    <strong style="font-size: 13px;">
                                        <asp:Label runat="server" ID="lblDeduct" Text="<%$Resources:CarInsurance,DEC%>" />:
                                    </strong>
                                </div>
                                <div class="column-2">
                                    <asp:DropDownList ID="ddlDeduct" CssClass="assumption-field" runat="server" Width="250">
                                        <asp:ListItem Text="<%$ Resources:CarInsurance,Option_DeductNo%>" Value="0" />
                                        <asp:ListItem Text="<%$ Resources:CarInsurance,Option_DeductYes%>" Value="5000" />
                                        <asp:ListItem Text="<%$ Resources:CarInsurance,Option_DeductAll%>" Selected="True"
                                            Value="-1" />
                                    </asp:DropDownList>
                                </div>
                                <div class="column-3">
                                </div>
                            </div>
                            <div id="divCTPL" runat="server" style="display: none;">
                                <div class="column-1">
                                    <strong style="font-size: 13px;">
                                        <asp:Label runat="server" ID="lblCTPL" Text="<%$Resources:CarInsurance,IncludeCMI%>" />:
                                    </strong>
                                </div>
                                <div class="column-2">
                                    <asp:RadioButton ID="rdoYesCTPL" onclick="CheckCTPL();CheckCTPLValidationCss();"
                                        runat="server" GroupName="ctpl" />
                                    <asp:Label ID="lblYesCTPL" runat="server" Text="<%$ Resources:CarInsurance,Option_Yes%>"></asp:Label>&nbsp;
                                    <asp:RadioButton ID="rdoNoCTPL" onclick="CheckCTPL();CheckCTPLValidationCss();" runat="server"
                                        GroupName="ctpl" Checked="true" />
                                    <asp:Label ID="lblNoCTPL" runat="server" Text="<%$ Resources:CarInsurance,Option_No%>"></asp:Label><div
                                        style="display: none">
                                        <asp:TextBox ID="txtCTPL" runat="server"></asp:TextBox></div>
                                    <asp:RequiredFieldValidator CssClass="validationError" ID="rfvCTPL" runat="server"
                                        ControlToValidate="txtCTPL" ErrorMessage="" ValidationGroup="cardetail" Display="Dynamic"></asp:RequiredFieldValidator>
                                    <div style="position: absolute; margin: -20px 0px 10px 120px">
                                        <a class="tooltips2" href="#">
                                            <img src="/images/tool-tips.png" width="18" height="18" alt="" style="vertical-align: middle;" />
                                            <span>
                                                <%=GetGlobalResourceObject("CarInsurance", "CMI")%><br />
                                                <br />
                                                <%=GetGlobalResourceObject("CarInsurance", "CMITooltip")%></span></a>
                                    </div>
                                </div>
                                <div class="column-3">
                                </div>
                            </div>
                            <div id="divYesAccMod" runat="server">
                                <div class="column-1">
                                    <strong style="font-size: 13px;">
                                        <asp:Label runat="server" ID="Label32" Text="<%$Resources:CarInsurance,AccessaryAndModification%>" />:
                                    </strong>
                                </div>
                                <div class="column-2">
                                    <asp:UpdatePanel ID="uplYesAccMod" runat="server">
                                        <ContentTemplate>
                                            <asp:RadioButton ID="rdoYesAccMod" onclick="CheckAccMod();CheckAccModValidationCss();"
                                                runat="server" GroupName="accmod" />
                                            <asp:Label ID="lblYesAccMod" runat="server" Text="<%$ Resources:CarInsurance,Option_YesHave%>"></asp:Label>&nbsp;
                                            <asp:RadioButton ID="rdoNoAccMod" onclick="CheckAccMod();CheckAccModValidationCss();"
                                                runat="server" GroupName="accmod" Checked="true" />
                                            <asp:Label ID="lblNoAccMod" runat="server" Text="<%$ Resources:CarInsurance,Option_NoHave%>"></asp:Label><div
                                                style="display: none">
                                                <asp:TextBox ID="txtAccMod" runat="server"></asp:TextBox></div>
                                            <asp:RequiredFieldValidator CssClass="validationError" ID="rfvAccMod" runat="server"
                                                ControlToValidate="txtAccMod" ErrorMessage="" ValidationGroup="cardetail" Display="Dynamic"></asp:RequiredFieldValidator></ContentTemplate>
                                    </asp:UpdatePanel>
                                </div>
                                <div class="column-3">
                                </div>
                            </div>
                            <div id="divAccModAmount" style="display: none;">
                                <div class="column-1">
                                    <strong style="font-size: 13px;">
                                        <asp:Label runat="server" ID="Label34" Text="<%$Resources:CarInsurance,AccessaryAndModificationAmount%>" />:
                                    </strong>
                                </div>
                                <div class="column-2">
                                    <asp:TextBox ID="txtAccModAmount" runat="server" MaxLength="7" CssClass="assumption-input"
                                        Width="220" />
                                    <asp:RequiredFieldValidator CssClass="validationError" ID="rfvAccModAmount" runat="server"
                                        ControlToValidate="txtAccModAmount" ErrorMessage="" ValidationGroup="cardetail"
                                        Display="Dynamic"></asp:RequiredFieldValidator><asp:RegularExpressionValidator CssClass="validationError"
                                            ID="revAccModAmount" ValidationExpression="^\d+$" runat="server" ControlToValidate="txtAccModAmount"
                                            ErrorMessage="" ValidationGroup="cardetail" Display="Dynamic"></asp:RegularExpressionValidator><asp:CustomValidator
                                                CssClass="validationError" ID="csvAccModAmount" ClientValidationFunction="CheckAccModAmount"
                                                OnServerValidate="CheckAccModAmount" runat="server" ControlToValidate="txtAccModAmount"
                                                ErrorMessage="" ValidationGroup="cardetail" Display="Dynamic"></asp:CustomValidator></div>
                                <div class="column-3">
                                </div>
                            </div>
                            <div>
                                <div class="column-1">
                                </div>
                                <div class="column-2">
                                    <asp:Button ID="btnNext" CssClass="action-button" runat="server" ValidationGroup="cardetails"
                                        OnClientClick="LoadValidationErrorCss();CheckOptionValidationCss();ClearChkCompareHid();if (Page_ClientValidate('cardetails')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'action-button-processing';}"
                                        ToolTip="Refresh Quote" CausesValidation="false" OnClick="btnNext_Click" Text="<%$ Resources:CarInsuranceResultPage,RefreshQuote%>" />
                                    <asp:HiddenField runat="server" ID="hidCoverageCommenceDate" />
                                    <asp:HiddenField ID="hidReloadKawnaFlag" runat="server" />
                                    <asp:HiddenField runat="server" ID="hdnURLFrom" Value="" />
                                </div>
                                <div class="column-3">
                                </div>
                            </div>
                        </div>
                        <div class="control-col-2">
                            <div>
                                <%--<img src="/images/elephant-dog.jpg" width="428" height="165" alt="" />--%>
                            </div>
                        </div>
                    </ContentTemplate>
                    <Triggers>
                    <asp:AsyncPostBackTrigger  ControlID="btnNext" EventName="Click" />
                    </Triggers>
                </asp:UpdatePanel>
            </div>
        </div>
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <div>
                <asp:LinkButton id="btnDiscountBanner" runat="server" OnClick="btnDiscountBanner_Click"></asp:LinkButton>
                    <a id="aBanDiscount" onclick="if(IsOneInsChecked())__doPostBack('ctl00$cpBody$btnDiscountBanner','');CheckChkCompare();" >
                    <img src="<%=GetGlobalResourceObject("ImageResource", "SongkranPromoUrl")%>" width="1000" height="104" alt="" /></a>
                </div>
                <div class="tab-container  top20">
                    <div class="eight left">
                        <div class="sub-heading">
                            <asp:Label ID="lblRecordCount" runat="server"></asp:Label>
                        </div>
                    </div>
                    <div class="two left top10" style="text-align: right; padding: 5px 10px 0 0;">
                        <strong style="font-size: 13px;">
                            <asp:Label runat="server" ID="lblFilter" Text="<%$Resources:CarInsurance,YouLookingFor%>" />:
                        </strong>
                    </div>
                    <div class="two left">
                        <asp:DropDownList ID="ddlFilter" runat="server" CausesValidation="true" OnClientClick="LoadValidationErrorCss();CheckOptionValidationCss();ClearChkCompareHid();;if (Page_ClientValidate('cardetail')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'action-button-processing';}"
                            AutoPostBack="true" OnSelectedIndexChanged="ddlFilter_SelectedIndexChanged">
                            <asp:ListItem Text="<%$ Resources:CarInsurance,All%>" Selected="True" Value="-1" />
                            <asp:ListItem Text="<%$ Resources:CarInsurance,BestSumInsured%>" Value="S" />
                            <asp:ListItem Text="<%$ Resources:CarInsurance,BestPremium%>" Value="P" />
                        </asp:DropDownList>
                    </div>
                </div>
                <div id="divNomatch" runat="server" visible="false" class="result-not-found">
                    <div style="font-size: 23px; margin-left: 20px; margin-top: 60px;">
                        <asp:Label ID="lblNomatch" runat="server"></asp:Label><div class="sub-heading top10 bottom-10"
                            id="divNomatchCallBack" runat="server" visible="false">
                            <%=GetGlobalResourceObject("General", "CallUsHotline")%>
                            <%=GetGlobalResourceObject("General", "OR")%>
                            <a href="" runat="server" id="aCallme">
                                <%=GetGlobalResourceObject("General", "LetCallyouBack")%></a>
                        </div>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <div>
            <div class="search-bar left" id="divSerchbar" runat="server">
                <div style="position: absolute; margin: -54px  0px 0px 450px;">
                    <img src="/images/search-chac.png" alt="" height="60" width="100">
                </div>
                <div class="bar-center">
                    <div class="bar-col-1">
                        <%=GetGlobalResourceObject("CarInsuranceResultPage", "Compare")%></div>
                    <div class="bar-col-2">
                        <%=GetGlobalResourceObject("CarInsuranceResultPage", "Insurers")%></div>
                    <div class="bar-col-3">
                        <%=GetGlobalResourceObject("CarInsuranceResultPage", "Type")%></div>
                    <div class="bar-col-4">
                        <%=GetGlobalResourceObject("Promotion", "Price")%>
                        <span style="font-size: 12px;">(<%=GetGlobalResourceObject("CarInsurance", "Baht")%>)</span>
                    </div>
                    <div class="bar-col-5">
                        <%=GetGlobalResourceObject("CarInsuranceResultPage", "Details")%></div>
                </div>
            </div>
            <asp:Label ID="lblCompareInfo" runat="server" Text='<%$Resources:CarInsuranceResultPage,Compare4Items%>'
                Visible="false" />
            <input type="text" id="hidStrResultCompare" runat="server" style="display: none;" />
            <input type="text" id="hidBtnCompareId" style="display: none;" />
            <input type="text" id="hidLblChkCompare" style="display: none;" />
            <asp:UpdatePanel ID="uplCarResult" runat="server">
                <ContentTemplate>
                    <asp:UpdateProgress AssociatedUpdatePanelID="" ID="updateProgress" DynamicLayout="false"
                        DisplayAfter="0" runat="server">
                        <ProgressTemplate>
                            <div class="loading-container">
                                <img src="/images/loader/loader-yellow.gif" width="66" height="66" alt="" /></div>
                        </ProgressTemplate>
                    </asp:UpdateProgress>
                    <input type="text" id="hidProvider" runat="server" style="display: none;" />
                    <asp:Repeater ID="rptCarResult" runat="server" OnItemDataBound="rptCarResult_ItemDataBound"
                        OnItemCommand="rptCarResult_ItemCommand">
                        <HeaderTemplate>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <div class="result-box">
                                <asp:Label ID="lblProviderId" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ProviderCompanyId")%>'
                                    Visible="false" />
                                <asp:Label ID="lblCarId" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CarId")%>'
                                    Visible="false" />
                                <asp:Label ID="lblTempResultId" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CITempResultId")%>'
                                    Visible="false" />
                                <div class="search-col-1">
                                    <input type="checkbox" id="chkCompare" name='<%# Eval("CITempResultId").ToString() %>'
                                        value='<%# Container.FindControl("btnCompare").ClientID %>' onclick="SetResultToCompare(this,this.name,this.value);" />
                                    <span id="spnChkCompare" runat="server"></span>
                                    <div style="padding-top: 5px;">
                                        <a class="tooltips2" href="#">
                                            <img src="/images/tool-tips.png" width="18" height="18" alt="" />
                                            <span>
                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "Select2Premium")%></span></a></div>
                                </div>
                                <div class="search-col-2">
                                    <div runat="server" id="divProvider">
                                    </div>
                                    <asp:Image ID="imgProvider" runat="server" AlternateText='<%# DataBinder.Eval(Container.DataItem, "PackageName")%>'
                                        ImageUrl='<%# DataBinder.Eval(Container.DataItem, "CompanyLogoWebUrl")%>' />
                                    <asp:Button runat="server" ID="btnCompare" Text='<%$Resources:CarInsuranceResultPage,Compare%>'
                                        CssClass="compare-button" Style="display: none;" CausesValidation="false" CommandName="compare" />
                                </div>
                                <div class="search-col-3">
                                    <asp:Label ID="lblPackageName" ToolTip='<%# DataBinder.Eval(Container.DataItem, "PackageName").ToString().Replace("&", "&amp;")%>'
                                        Text='<%# DataBinder.Eval(Container.DataItem, "PackageName").ToString().Replace("&", "&amp;")%>'
                                        runat="server" /><br />
                                    <div class="body-text">
                                        <%=GetGlobalResourceObject("CarInsuranceResultPage", "Deductible")%>
                                        :
                                        <asp:Label ID="lblDeductible" runat="server" /><br />
                                        <%=GetGlobalResourceObject("CarInsuranceResultPage", "CoverOwnDamage")%>
                                        :
                                        <asp:Label ID="lblSumInsured" runat="server" /><br />
                                        <div class="flood left" id="divFlood" runat="server">
                                            <%=GetGlobalResourceObject("CarInsuranceResultPage", "FloodCover")%>:
                                            <img src="/images/icon-flood.png" style="vertical-align: middle;" width="39" height="33"
                                                alt="" />
                                        </div>
                                    </div>
                                </div>
                                <div class="search-col-5">
                                    <div class="type-row-one">
                                    </div>
                                    <div class="type-row-two">
                                        <asp:Label ID="lblClassType" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Info2")%>' />
                                    </div>
                                    <div class="type-row-three" id="divCMITitle" runat="server">
                                        <%=GetGlobalResourceObject("CarInsurance", "CMI")%>
                                    </div>
                                    <div class="type-row-four" id="divTotalTitle" runat="server">
                                        <%=GetGlobalResourceObject("CarInsurance", "Total")%></div>
                                </div>
                                <div class="search-col-4">
                                    <div class="premium-line-through">
                                        <asp:Label ID="lblAnnualPremiumDisplay" runat="server"></asp:Label></div>
                                    <div class="premium-normal" id="divBeforeCMI" runat="server">
                                        <asp:Label ID="lblBeforeCMI" runat="server"></asp:Label></div>
                                    <div class="premium-normal" id="divCMI" runat="server">
                                        <asp:Label ID="lblCMI" runat="server"></asp:Label></div>
                                    <div class="premium-promotion" id="divPromoPremium" runat="server">
                                        <asp:Label ID="lblPromotionPriceDisplay" runat="server"></asp:Label></div>
                                    <div class="divH2" style="display: none">
                                        &nbsp;<asp:Label ID="lblPremiumPrice" runat="server" Text="" />
                                        &nbsp;<asp:Label ID="lblAnnualPremium" runat="server" Text="" />
                                    </div>
                                    <div id="divDiscount" runat="server" style="display: none">
                                        <asp:Label ID="lblDiscount" runat="server" Text="<%$Resources:CarInsuranceResultPage,OFF%>" />
                                    </div>
                                </div>
                                <div class="search-col-6 search-box-expand-btn">
                                    <%=GetGlobalResourceObject("General", "MoreInfo")%><div style="float: right; padding-right: 30px;">
                                        <a class="tooltips2" href="#">
                                            <img src="/images/tool-tips.png" width="18" height="18" alt="" />
                                            <span>
                                                <%=GetGlobalResourceObject("General", "MoreInfo")%><br />
                                                <br />
                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "ForMoreInfo")%></span></a></div>
                                    <img src="/images/info-arrow.png" width="100" height="17" alt="" />
                                    <div id="divCNYPromoIcon" runat="server" visible="false" style="padding-top: 10px;">
                                        <img src="<%=GetGlobalResourceObject("ImageResource", "ImgCNYIcon")%>" width="81"
                                            height="56" alt="" /></div>
                                </div>
                                <div class="search-col-7">
                                    <asp:Button runat="server" ID="btnBuyOnline" Visible="true" CssClass="buy-now-btn"
                                        CausesValidation="false" CommandName="buyonline" Text="<%$Resources:Promotion,BuyNow %>" />
                                    <asp:Button runat="server" ID="btnCallforDiscount" Visible="true" CssClass="call-back-btn"
                                        CausesValidation="false" CommandName="callfordiscount" Text="<%$Resources:CarInsuranceResultPage,CallBack %>" />
                                </div>
                                <div class="content" style="display: none;">
                                    <div class="quote-detail-row">
                                        <div class="quote-heading">
                                            <asp:Label ID="lblPackageNameMoreInfo" ToolTip='<%# DataBinder.Eval(Container.DataItem, "PackageName").ToString().Replace("&", "&amp;")%>'
                                                Text='<%# DataBinder.Eval(Container.DataItem, "PackageName").ToString().Replace("&", "&amp;")%>'
                                                runat="server" />
                                        </div>
                                    </div>
                                    <div class="detail-col-1">
                                        <div class="partner-box">
                                            <%--<div class="detail-box">--%>
                                            <div runat="server" id="divProviderMoreInfo">
                                            </div>
                                            <asp:Image ID="imgProviderMoreInfo" runat="server" Width="176px" Height="64px" AlternateText='<%# DataBinder.Eval(Container.DataItem, "PackageName")%>'
                                                ImageUrl='<%# DataBinder.Eval(Container.DataItem, "CompanyLogoWebUrl")%>' />
                                        </div>
                                        <div class="price-heading">
                                            <asp:Label ID="lblResultPremium" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PromotionPrice", "{0:#,0.00}")%>'></asp:Label><span
                                                style="font-size: 14px;"><%=GetGlobalResourceObject("CarInsurance", "Baht")%></span>
                                        </div>
                                    </div>
                                    <div class="detail-col-2">
                                        <div class="small-heading">
                                            <asp:Label ID="lblOwnDamageTitleMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,OwnDamage %>" /></div>
                                        <asp:Label ID="lblTitleDeductibleMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,Deductible %>" />
                                        :
                                        <asp:Label ID="lblDeductibleMoreInfo" runat="server" Text="" /><br />
                                        <asp:Label ID="lblTitleCoverOwnDamageMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,CoverOwnDamage %>" />
                                        :
                                        <asp:Label ID="lblCoverOwnDamageMoreInfo" runat="server" Text="" /><br />
                                        <asp:Label ID="lblTitleFireMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,Fire %>" />
                                        :
                                        <asp:Label ID="lblFireMoreInfo" runat="server" Text="" /><br />
                                        <asp:Label ID="lblTitleTheftMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,Theft %>" />
                                        :
                                        <asp:Label ID="lblTheftMoreInfo" runat="server" Text="" /><br />
                                        <br />
                                        <div class="small-heading">
                                            <asp:Label ID="lblAdditionalCoverMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,AdditionalCovers %>" /></div>
                                        <asp:Label ID="lblCoverPADriverMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,CoverPADriver %>" />:
                                        <asp:Label ID="lblPADriverMoreInfo" runat="server" Text="" /><br />
                                        <asp:Label ID="lblCoverMEDMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,CoverMED %>" />
                                        :
                                        <asp:Label ID="lblMEDMoreInfo" runat="server" Text="" /><br />
                                        <asp:Label ID="lblCoverBailBondMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,CoverBailBond %>" />
                                        :
                                        <asp:Label ID="lblBailBondMoreInfo" runat="server" Text="" /><br />
                                        <div id="divFloodMoreInfo" runat="server">
                                            <div style="padding-top: 10px;">
                                                <%=GetGlobalResourceObject("CarInsuranceResultPage", "FloodCover")%>:
                                                <img src="/images/icon-flood.png" style="vertical-align: middle;" width="39" height="33"
                                                    alt="" />
                                            </div>
                                        </div>
                                    </div>
                                    <div class="detail-col-3">
                                        <div class="small-heading">
                                            <asp:Label ID="lblThirdPartyMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,ThirdPartyLiability %>" /></div>
                                        <asp:Label ID="lblTitleTPPDMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,CoverTPPD %>" />:
                                        <asp:Label ID="lblTPPDMoreInfo" runat="server" Text="" /><br />
                                        <asp:Label ID="lblTitleTPBIAMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,CoverTPBIA %>" />
                                        :
                                        <asp:Label ID="lblTPBIAMoreInfo" runat="server" Text="" /><br />
                                        <asp:Label ID="lblTitleTPBIPMoreInfo" runat="server" Text="<%$Resources:CarInsuranceResultPage,CoverTPBIP %>" />
                                        :
                                        <asp:Label ID="lblTPBIPMoreInfo" runat="server" Text="" /><br />
                                    </div>
                                    <div class="quote-detail-info">
                                        <div class="small-heading">
                                            <asp:Label ID="lblPromo" runat="server" Text="" /></div>
                                        <asp:Label ID="lblDescription" runat="server" Text="" /><br />
                                    </div>
                                </div>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                    <div style="display: none;"><asp:HiddenField ID="lblRedirectUrl" runat="server" />
                        <asp:Label ID="lblUserStatus" runat="server"></asp:Label><asp:Label ID="lblNewEmail"
                            runat="server"></asp:Label><asp:Label ID="lblNewName" runat="server"></asp:Label><asp:Label
                                ID="lblNewMobile" runat="server"></asp:Label><asp:Label ID="lblNewUserId" runat="server"
                                    Text="0"></asp:Label><asp:Button ID="Button1" runat="server" Text="Button" />
                    </div>
                    <cc1:ModalPopupExtender ID="mpeCallPop" runat="server" TargetControlID="Button1"
                        PopupControlID="PanelCallMepop" BehaviorID="behCallMepop" DropShadow="false"
                        BackgroundCssClass="simplemodal-overlay" CancelControlID="btnCancel">
                    </cc1:ModalPopupExtender>
                    <asp:Panel ID="PanelCallMepop" runat="server" Style="display: none;">
                        <!-- modal content -->
                        <div id="simplemodal-container-callme">
                            <div class="pop-col">
                                <div class=" text-heading-black">
                                    <div>
                                        <%=GetGlobalResourceObject("CarInsurance", "CallYouBack")%></div>
                                </div>
                                <div>
                                    <%=GetGlobalResourceObject("CarInsurance", "YourCarModel")%>:
                                    <div id="divMakeModelNamePopup" runat="server">
                                    </div>
                                </div>
                                <div style="width: 440px;">
                                    <asp:ValidationSummary ID="vsCallme" runat="server" ValidationGroup="callme" ShowSummary="True"
                                        HeaderText="<%$ Resources:General,RequiredValidation%>" CssClass="error-msg" />
                                </div>
                                <div class="cb-box">
                                    <div class="cb-row-1">
                                        <%=GetGlobalResourceObject ("CarInsurance","CallMeAt") %>:</div>
                                    <div class="cb-col-1">
                                        <asp:DropDownList CssClass="cb-fields-dropdown" runat="server" ID="ddlCallMeTime">
                                            <asp:ListItem Value="-1" Text="<%$Resources:CarInsurance,Select %>" />
                                            <asp:ListItem Value="1" Text="<%$Resources:CarInsurance,CallMeMorning %>" />
                                            <asp:ListItem Value="2" Text="<%$Resources:CarInsurance,CallMeAfternoon %>" />
                                            <asp:ListItem Value="3" Text="<%$Resources:CarInsurance,CallMeEvening %>" />
                                            <asp:ListItem Value="4" Text="<%$Resources:CarInsurance,CallMeAnytime %>" />
                                        </asp:DropDownList>
                                        <asp:RequiredFieldValidator ID="rfvCallMeTime" runat="server" CssClass="validationError"
                                            ValidationGroup="callme" ErrorMessage="" Text="" InitialValue="-1" ControlToValidate="ddlCallMeTime"></asp:RequiredFieldValidator></div>
                                    <%--<div class="cb-row-1">
                                    </div>
                                    <div class="cb-col-1">
                                        <div style="float: right; padding-right: 10px;">
                                            <asp:Button ID="btnSubmit" ValidationGroup="callme" Text="<%$Resources:General,Submit%>"
                                                Width="150" runat="server" CssClass="action-button" OnClick="btnSubmit_Click"
                                                ToolTip="<%$Resources:General,Submit%>" OnClientClick="LoadValidationErrorCss();if (Page_ClientValidate('callme')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'action-button-processing';}" />
                                        </div>
                                    </div>--%>
                                    <div class="cb-row-full">
                                        <div class="heading-sub-title" style="width: 300px; float: left;">
                                            <%=GetGlobalResourceObject("General", "YourDetails")%></div>
                                        <div style="float: right; width: 140px; text-align: right; padding-top: 20px; display:none;">
                                            <a href="" class="general-links" style="text-align: right;" onclick="EnableEditDetails();return false;">
                                                <img src="/images/edit.png" width="16" height="16" alt="" /><%=GetGlobalResourceObject("General", "Edit")%></a>
                                        </div>
                                    </div>
                                    <div class="cb-row-1">
                                        <asp:Label ID="Label17" runat="server" Text="<%$ Resources:CarInsurance,Name%>" />:</div>
                                    <div class="cb-col-1">
                                        <asp:TextBox ID="txtNamePop" CssClass="cb-fields-disable" runat="server" MaxLength="50"></asp:TextBox>
                                        <cc1:TextBoxWatermarkExtender ID="tbwNamePop" runat="server"
                                                TargetControlID="txtNamePop" WatermarkCssClass="cb-fields" WatermarkText="<%$Resources:General,EnterName%>">
                                            </cc1:TextBoxWatermarkExtender>
                                        <asp:RequiredFieldValidator ID="rfvNamePop" runat="server" Text="" CssClass="validationError"
                                            ValidationGroup="callme" ErrorMessage="" ControlToValidate="txtNamePop" Display="Dynamic"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                ID="revNamePop" Text="" CssClass="validationError" runat="server" ValidationGroup="callme"
                                                ErrorMessage="" ControlToValidate="txtNamePop" ValidationExpression="^[\p{L}\d]*[^#$%^&*():/\.'^<>]*$"
                                                Display="Dynamic"></asp:RegularExpressionValidator></div>
                                    <div class="cb-row-1">
                                        <asp:Label ID="lblEmailPop" runat="server" Text="<%$ Resources:CarInsurance,EmailAddress%>" />:</div>
                                    <div class="cb-col-1">
                                        <asp:TextBox ID="txtEmailPop" CssClass="cb-fields-disable" runat="server" MaxLength="100"></asp:TextBox>
                                        <div style="float: right; margin-top: 7px;">
                                                <a id="A1" runat="server" class="tooltips2">
                                                    <img src="/images/lock.png" alt="ssl" width="25" height="25" /></a>
                                            </div>
                                        <cc1:TextBoxWatermarkExtender ID="tbwEmailPop" runat="server" TargetControlID="txtEmailPop"
                                            WatermarkCssClass="cb-fields" WatermarkText="<%$Resources:General,EnterEmail%>">
                                        </cc1:TextBoxWatermarkExtender>
                                        <asp:RequiredFieldValidator ID="rfvEmailPop" runat="server" Text="" CssClass="validationError"
                                            ValidationGroup="callme" ErrorMessage="" ControlToValidate="txtEmailPop" Display="Dynamic"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                ID="revEmailPop" Text="" CssClass="validationError" runat="server" ValidationGroup="callme"
                                                ErrorMessage="" ControlToValidate="txtEmailPop" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                                Display="Dynamic"></asp:RegularExpressionValidator></div>
                                    <div class="cb-row-1">
                                        <asp:Label ID="lblMobileNoPop" runat="server" Text="<%$ Resources:CarInsurance,MobileNo%>" />:</div>
                                    <div class="cb-col-1">
                                        <asp:TextBox runat="server" ID="txtMobilePop" CssClass="cb-fields-disable" MaxLength="10"></asp:TextBox>
                                        <div style="float: right; margin-top: 7px;">
                                                <a id="A2" runat="server" class="tooltips2">
                                                    <img src="/images/lock.png" alt="ssl" width="25" height="25" />
                                                </a>
                                            </div>
                                        <cc1:TextBoxWatermarkExtender ID="tbwMobilePop" runat="server" TargetControlID="txtMobilePop"
                                            WatermarkCssClass="cb-fields" WatermarkText="<%$Resources:General,EnterMobile%>">
                                        </cc1:TextBoxWatermarkExtender>
                                        <asp:RequiredFieldValidator ID="rfvMobilePop" runat="server" ControlToValidate="txtMobilePop"
                                            CssClass="validationError" Display="Dynamic" ErrorMessage="" ValidationGroup="callme"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                ID="revMobilePop" runat="server" ControlToValidate="txtMobilePop" CssClass="validationError"
                                                ErrorMessage="" ValidationExpression="0[5-9]\d{8}" ValidationGroup="callme"></asp:RegularExpressionValidator></div>
                                    <div class="cb-row-1">
                                    </div>
                                    <div class="cb-col-1">
                                        <div style="float: right; padding-right: 10px;">
                                            <asp:Button ID="btnSubmit" ValidationGroup="callme" Text="<%$Resources:General,Submit%>"
                                                Width="150" runat="server" CssClass="action-button" OnClick="btnSubmit_Click"
                                                ToolTip="<%$Resources:General,Submit%>" OnClientClick="LoadValidationErrorCss();if (Page_ClientValidate('callme')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'action-button-processing';}" />
                                        </div>
                                    </div>
                                    <div style="width: 450px; display: none;">
                                        <asp:CheckBox ID="checkIsAgreement" runat="server" Checked="true" />
                                        <asp:Label ID="lblAgreement" runat="server" Text="<%$ Resources:General,Agreement%>"
                                            CssClass="check-agree-text"></asp:Label></div>
                                    <div class="cb-row-1">
                                        <div id="divCallMe" runat="server" visible="false">
                                            <asp:Label ID="lblCallMeMessage" runat="server" Font-Size="12px" ForeColor="Green"
                                                Font-Bold="true" Font-Names="Arial" Text="" />
                                            <asp:HiddenField ID="hdnUserId" runat="server" Value="0" />
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="pop-col-right">
                                <div class="bubble-heading">
                                </div>
                                <div class="bubble-col-left" style="display: none;">
                                    <div class="" id="divBrandPopup" runat="server">
                                    </div>
                                </div>
                                <div class="bubble-col-right">
                                    <div class="" id="divInsurerPopup" runat="server">
                                    </div>
                                </div>
                                <div class="bubble-heading">
                                    <%--<%=GetGlobalResourceObject("General", "PremiumAmount")%>--%></div>
                                <div class="bubble-price-tag">
                                    <div id="divPremiumPopup" runat="server">
                                    </div>
                                </div>
                            </div>
                            <div style="float: right;">
                                <asp:ImageButton ID="btnCancel" runat="server" CssClass="modalCloseImg" ImageUrl="/images/close.png"
                                    AlternateText="X"  OnClientClick="CheckChkCompare();" OnClick="btnCancel_Click" /></div>
                        </div>
                    </asp:Panel>
            <div>
                <cc1:ModalPopupExtender ID="mpeUserLogin" runat="server" TargetControlID="lnkbtnSignin"
                    PopupControlID="pnModelPopup" BehaviorID="behLogInpop" DropShadow="false" CancelControlID="btnCancelLogin"
                    BackgroundCssClass="simplemodal-overlay">
                </cc1:ModalPopupExtender>
                <asp:Panel ID="pnModelPopup" runat="server" Style="display: none;">
                    <!-- modal content -->
                    <div id="simplemodal-container">
                        <%--<div id="basic-modal-content">--%>
                        <div class="pop-col">
                            <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                                <ContentTemplate>
                                    <div class=" text-heading-black">
                                        <%=GetGlobalResourceObject("General", "EnterDetails")%>
                                    </div>
                                    <div>
                                        <asp:Label ID="lblCarModelName" runat="server"></asp:Label><br />
                                    </div>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                            <div style="width: 440px; height: 30px;">
                                <asp:ValidationSummary ID="vsUserDetails" runat="server" ValidationGroup="userlogin"
                                    ShowSummary="True" HeaderText="<%$ Resources:General,RequiredValidation%>" CssClass="error-msg" />
                                <br />
                            </div>
                            <div class="cb-box">
                                <asp:UpdatePanel ID="upnlUserLogindetails" runat="server">
                                    <ContentTemplate>
                                        <div class="cb-row-1">
                                            <asp:Label ID="Label19" runat="server" Text="<%$ Resources:CarInsurance,Name%>" />:</div>
                                        <div class="cb-col-1">
                                            <asp:TextBox ID="txtUserName" CssClass="cb-fields" runat="server" MaxLength="100"></asp:TextBox>
                                            <cc1:TextBoxWatermarkExtender ID="tbwUserName" runat="server" TargetControlID="txtUserName"
                                                WatermarkCssClass="cb-fields" WatermarkText="<%$Resources:General,EnterName%>">
                                            </cc1:TextBoxWatermarkExtender>
                                            <asp:RequiredFieldValidator ID="rfvUserName" runat="server" Text="" CssClass="validationError"
                                                ValidationGroup="userlogin" ErrorMessage="" ControlToValidate="txtUserName" Display="Dynamic"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="revUserName" Text="" CssClass="validationError"
                                                runat="server" ValidationGroup="userlogin" ErrorMessage="" ControlToValidate="txtUserName"
                                                ValidationExpression="^[\p{L}\d]*[^#$%^&*():/\.'^<>]*$" Display="Dynamic"></asp:RegularExpressionValidator>
                                        </div>
                                        <div class="cb-row-1">
                                            <asp:Label ID="lblUserEmail" runat="server" Text="<%$ Resources:CarInsurance,EmailAddress%>" />:</div>
                                        <div class="cb-col-1">
                                            <asp:TextBox ID="txtUserEmail" CssClass="cb-fields" runat="server" MaxLength="100"></asp:TextBox>
                                            <div style="float: right; margin-top: 7px;">
                                                <a id="A3" runat="server" class="tooltips2">
                                                    <img src="/images/lock.png" alt="ssl" width="25" height="25" /></a>
                                            </div>
                                            <cc1:TextBoxWatermarkExtender ID="tbwUserEmail" runat="server" TargetControlID="txtUserEmail"
                                                WatermarkCssClass="cb-fields" WatermarkText="<%$Resources:General,EnterEmail%>">
                                            </cc1:TextBoxWatermarkExtender>
                                            <asp:RequiredFieldValidator ID="rfvUserEmail" runat="server" Text="" CssClass="validationError"
                                                ValidationGroup="userlogin" ErrorMessage="" ControlToValidate="txtUserEmail"
                                                Display="Dynamic"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="revUserEmail" Text="" CssClass="validationError"
                                                runat="server" ValidationGroup="userlogin" ErrorMessage="" ControlToValidate="txtUserEmail"
                                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" Display="Dynamic"></asp:RegularExpressionValidator>
                                        </div>
                                        <div class="cb-row-1">
                                            <asp:Label ID="lblUserMobileNo" runat="server" Text="<%$ Resources:CarInsurance,MobileNo%>" />:</div>
                                        <div class="cb-col-1">
                                            <asp:TextBox runat="server" ID="txtUserMobile" CssClass="cb-fields" MaxLength="10"></asp:TextBox>
                                            <input type="text" id="hidUserMobile" runat="server" style="display: none;" value="" />
                                            <div style="float: right; margin-top: 7px;">
                                                <a id="A4" runat="server" class="tooltips2">
                                                    <img src="/images/lock.png" alt="ssl" width="25" height="25" /></a>
                                            </div>
                                            <cc1:TextBoxWatermarkExtender ID="tbwUserMobile" runat="server" TargetControlID="txtUserMobile"
                                                WatermarkCssClass="cb-fields" WatermarkText="<%$Resources:General,MobileExample%>">
                                            </cc1:TextBoxWatermarkExtender>
                                            <asp:RequiredFieldValidator ID="rfvUserMobile" runat="server" ControlToValidate="txtUserMobile"
                                                CssClass="validationError" Display="Dynamic" ErrorMessage="" ValidationGroup="userlogin"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="revUserMobile" runat="server" ControlToValidate="txtUserMobile"
                                                CssClass="validationError" ErrorMessage="" ValidationExpression="0[5-9]\d{8}"
                                                ValidationGroup="userlogin"></asp:RegularExpressionValidator>
                                        </div>
                                        <%--<div style="padding-left: 145px; padding-bottom: 10px; font-size: 11px; text-align: left;">
                                            <%=GetGlobalResourceObject("General", "MobileExample")%></div>--%>
                                        <div class="cb-row-full">
                                            <asp:CheckBox ID="chkLoginAgreement" runat="server" onclick="CheckedChanged();" />
                                            <asp:Label ID="Label21" runat="server" Text="<%$ Resources:General,Agreement%>" CssClass="check-agree-text"></asp:Label>
                                            <asp:RequiredFieldValidator ID="rfvIsAccept" runat="server" ControlToValidate="txtIsAccept"
                                                CssClass="validationError" Display="Dynamic" ErrorMessage="" ValidationGroup="userlogin"></asp:RequiredFieldValidator>
                                            <div style="display: none;">
                                                <asp:TextBox ID="txtIsAccept" runat="server"></asp:TextBox>
                                            </div>
                                        </div>
                                        <div class="cb-row-full">
                                            <div>
                                                <asp:Button ID="btnViewResultsNow" ValidationGroup="userlogin" Text="<%$Resources:General,Submit%>"
                                                    Width="200" runat="server" CssClass="action-button" OnClick="btnViewResultsNow_Click"
                                                    OnClientClick="LoadValidationErrorCss();CheckedChanged();if (Page_ClientValidate('userlogin')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');this.className = 'action-button-processing';}" />
                                                <asp:HiddenField ID="HiddenField1" runat="server" Value="0" />
                                                <div id="divFacebookSignin" style="padding-top: 5px;">
                                                    <asp:LinkButton ID="LinkButton1" runat="server" OnClientClick="userLogin(); return false;" style="display:none;">
                                                        <%--<img src='<%$ Resources:ImageResource,ImgLoginFB%>' alt="" width="180" height="35" style="padding-bottom:10px;" />--%>
                                                        <asp:Image ID="imgFB" runat="server" AlternateText="" Width="180" Height="35" Style="padding-bottom: 10px;"
                                                            ImageUrl='<%$ Resources:ImageResource,ImgLoginFB%>' />
                                                    </asp:LinkButton>
                                                    <asp:LinkButton ID="lkFacebookLogin" runat="server" CausesValidation="false" OnClick="lkFacebookLogin_Click"
                                                        Style="display: none;"></asp:LinkButton>
                                                    <asp:HiddenField ID="hiddenFacebookName" runat="server" />
                                                    <asp:HiddenField ID="hiddenFacebookEmail" runat="server" />
                                                    <asp:HiddenField ID="hiddenFacebookID" runat="server" />
                                                </div>
                                            </div>
                                        </div>
                                        <hr /><br />
                                        <div class="cb-row-full">
                                            <%=GetGlobalResourceObject("General", "OR")%>
                                            <asp:LinkButton ID="btnSwitchToCallBack" runat="server" Text="<%$ Resources:General,LetusCallBack%>" OnClientClick="$('#<%=btnCancelLogin.ClientID%>').click();CheckChkCompare();" OnClick="btnSwitchToCallBack_click"></asp:LinkButton>        
                                        </div>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </div>
                        </div>
                        <div style="float: right;">
                            <asp:ImageButton ID="btnCancelLogin" runat="server" CssClass="modalCloseImg" ImageUrl="/images/close.png"
                                AlternateText="X" OnClientClick="CheckChkCompare();" /></div>
                    </div>
                </asp:Panel>
            </div>          
                   
            <div style="display: none;">
                <asp:LinkButton ID="lnkbtnSignin" runat="server" Text="Signin" CausesValidation="false"></asp:LinkButton></div>
                </ContentTemplate>
            </asp:UpdatePanel>
            <div style="height: 150px" runat="server" id="divMessage" visible="false">
                <asp:Label ID="lblMessage" Font-Size="20px" Font-Bold="true" runat="server" Visible="false"></asp:Label><input
                    runat="server" id="hidCurInsuranceCompany" type="hidden" /><input runat="server"
                        id="hidCurrentInsurer" type="hidden" /></div>
            <div style="display: none;">
                <asp:Label ID="lblCarModelYear" runat="server" Text="<%$ Resources:CarInsurance,CarModelYear%>" />
                <asp:UpdatePanel ID="uplManYear" runat="server">
                    <ContentTemplate>
                        <asp:DropDownList ID="ddlManufactYear" runat="server" CssClass="assumption-field"
                            AutoPostBack="True" OnSelectedIndexChanged="ddlManufactYear_SelectedIndexChanged">
                            <asp:ListItem Text="<%$ Resources:CarInsurance,Select%>" Value="-1" />
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator CssClass="validationError" ID="rfvManufactYear" ControlToValidate="ddlManufactYear"
                            InitialValue="-1" runat="server" ErrorMessage="" Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator></ContentTemplate>
                </asp:UpdatePanel>
                <asp:Label ID="Label6" runat="server" Text="<%$ Resources:CarInsurance,CarMakeModel%>" />
                <asp:UpdatePanel ID="uplCarInfo" runat="server">
                    <ContentTemplate>
                        <asp:DropDownList runat="server" ID="ddlCarMake" CssClass="assumption-field" AutoPostBack="true"
                            OnSelectedIndexChanged="ddlCarMake_SelectedIndexChanged">
                            <asp:ListItem Text="<%$ Resources:CarInsurance,Select%>" Value="-1" />
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator CssClass="validationError" ID="rfvCarMake" ControlToValidate="ddlCarMake"
                            InitialValue="-1" runat="server" ErrorMessage="" Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator><asp:DropDownList
                                runat="server" ID="ddlModelBodyCCDoor" AutoPostBack="True" OnSelectedIndexChanged="ddlModelBodyCCDoor_SelectedIndexChanged">
                                <asp:ListItem Value="-1" Text="<%$ Resources:CarInsurance,Select%>"></asp:ListItem>
                            </asp:DropDownList>
                        <asp:RequiredFieldValidator CssClass="validationError" ID="rfvModelBodyCCDoor" ControlToValidate="ddlModelBodyCCDoor"
                            InitialValue="-1" runat="server" ErrorMessage="" Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator><asp:Label
                                runat="server" ID="lblModelDesc" />
                        <asp:Label runat="server" ID="lblCarVehicleType" Text="" Visible="false" />
                    </ContentTemplate>
                </asp:UpdatePanel>
                <asp:Label ID="lblVehicleType" runat="server" Text="<%$ Resources:CarInsurance,VehicleType%>" />
                <asp:UpdatePanel ID="uplVehicleType" runat="server">
                    <ContentTemplate>
                        <asp:DropDownList ID="ddlVehicleType" runat="server" CssClass="assumption-field"
                            OnSelectedIndexChanged="ddlVehicleType_SelectedIndexChanged" AutoPostBack="True">
                            <asp:ListItem Value="110" Text="<%$ Resources:CarInsurance,VehicleType_Private%>" />
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator CssClass="validationError" ID="rfvVehicleType" ControlToValidate="ddlVehicleType"
                            InitialValue="-1" runat="server" ErrorMessage="" Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator></ContentTemplate>
                </asp:UpdatePanel>
                <div id="divSumInsured" style="display: none;">
                    <asp:UpdatePanel ID="uplSumInsured" runat="server">
                        <ContentTemplate>
                            <asp:Label runat="server" Text="<%$ Resources:CarInsurance,SumInsured%>" ID="lblSumInsuredTitle"
                                Visible="false" />
                            <asp:Label runat="server" ID="lblSumInsured" Text="0" Visible="false" />
                            <div style="display: none">
                                <asp:TextBox ID="txtSumInsured" MaxLength="9" Width="80px" runat="server" />
                                <asp:TextBox ID="txtNewSumInsured" MaxLength="9" Width="80px" runat="server" />
                                <asp:TextBox ID="txtGroupNo" Text="-1" MaxLength="2" Width="30px" runat="server" />
                            </div>
                            <asp:RequiredFieldValidator CssClass="validationError" ID="rfvSumInsured" InitialValue="0"
                                ControlToValidate="txtSumInsured" runat="server" ErrorMessage="" Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                    CssClass="validationError" ID="revSumInsured" ValidationExpression="^\d+$" ControlToValidate="txtSumInsured"
                                    runat="server" ErrorMessage="" Text="" ValidationGroup="cardetail"></asp:RegularExpressionValidator><asp:RequiredFieldValidator
                                        CssClass="validationError" ID="rfvGroupNo" InitialValue="-1" ControlToValidate="txtSumInsured"
                                        runat="server" ErrorMessage="" Text="" ValidationGroup="cardetail"></asp:RequiredFieldValidator></ContentTemplate>
                    </asp:UpdatePanel>
                </div>
                <asp:Label ID="Label7" runat="server" Text="<%$ Resources:CarInsurance,Name%>" />
                <asp:TextBox ID="txtName" CssClass="assumption-field" MaxLength="50" runat="server"></asp:TextBox><asp:RequiredFieldValidator
                    ID="rfvName" runat="server" CssClass="validationError" ValidationGroup="cardetail"
                    ErrorMessage="" Text="" ControlToValidate="txtName"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                        ID="revName" runat="server" ValidationGroup="cardetail" ValidationExpression="^[\p{L}\d]*[^#$%^&*():/\.'^<>]*$"
                        CssClass="validationError" ControlToValidate="txtName" ErrorMessage=""></asp:RegularExpressionValidator><asp:UpdatePanel
                            ID="uplConfirmEmail" runat="server">
                            <ContentTemplate>
                                <asp:Label ID="lblEmail" runat="server" Text="<%$ Resources:CarInsurance,EmailAddress%>" />
                                <asp:TextBox ID="txtEmailAddress" runat="server" MaxLength="100" CssClass="assumption-field"
                                    AutoPostBack="true"></asp:TextBox><asp:RequiredFieldValidator ID="rfvEmail" runat="server"
                                        Text="" CssClass="validationError" ValidationGroup="cardetail" ErrorMessage=""
                                        ControlToValidate="txtEmailAddress" Display="Dynamic"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                            ID="rfvEmailValid" Text="" CssClass="validationError" runat="server" ValidationGroup="cardetail"
                                            ErrorMessage="" ControlToValidate="txtEmailAddress" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                            Display="Dynamic"></asp:RegularExpressionValidator></ContentTemplate>
                        </asp:UpdatePanel>
                <asp:Label ID="lblMobileNo" runat="server" Text="<%$ Resources:CarInsurance,MobileNo%>" />
                <asp:TextBox runat="server" ID="txtMobile" CssClass="pw-fields" MaxLength="10"></asp:TextBox><asp:RequiredFieldValidator
                    ID="rfvMobile" runat="server" ControlToValidate="txtMobile" CssClass="validationError"
                    Display="Dynamic" ErrorMessage="" ValidationGroup="cardetail"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                        ID="revMobile" runat="server" ControlToValidate="txtMobile" CssClass="validationError"
                        ErrorMessage="" ValidationExpression="0[5-9]\d{8}" ValidationGroup="cardetail"></asp:RegularExpressionValidator><asp:Label
                            ID="lblOccupation" runat="server" Text="<%$ Resources:CarInsurance,Occupation%>" />
                <asp:DropDownList ID="ddlOccupation" runat="server" CssClass="pw-row-6">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="rfvOccupation" ControlToValidate="ddlOccupation"
                    CssClass="validationError" runat="server" ValidationGroup="cardetail" ErrorMessage=""
                    InitialValue="-1"></asp:RequiredFieldValidator><div class="column-4">
                        <strong style="font-size: 13px;">
                            <asp:Label runat="server" ID="lblAnyClaimLastYearTitle" Text="<%$Resources:CarInsurance,AnyClaimLastYear%>" />:
                        </strong>
                    </div>
                <div class="column-4">
                    <asp:RadioButton ID="rdoYesClaimLastYear" onclick="CheckClaim();CheckClaimValidationCss();SetClaimNCBYes(this.checked);"
                        runat="server" GroupName="anyclaim"></asp:RadioButton>
                    <asp:Label ID="lblYesClaimLastYear" runat="server" Text="<%$ Resources:CarInsurance,Option_YesHave%>"></asp:Label>&nbsp;
                    <asp:RadioButton ID="rdoNoClaimLastYear" onclick="CheckClaim();CheckClaimValidationCss();SetClaimNCBNo(this.checked);"
                        runat="server" GroupName="anyclaim" Checked="true"></asp:RadioButton>
                    <asp:Label ID="lblNoClaimLastYear" runat="server" Text="<%$ Resources:CarInsurance,Option_NoHave%>"></asp:Label><div
                        style="display: none">
                        <asp:TextBox ID="txtAnyClaim" runat="server"></asp:TextBox></div>
                    <asp:RequiredFieldValidator CssClass="validationError" ID="rfvAnyClaim" runat="server"
                        ControlToValidate="txtAnyClaim" ErrorMessage="" ValidationGroup="cardetail" Display="Dynamic"
                        Text=""></asp:RequiredFieldValidator></div>
                <div id="idNCB" runat="server" style="display: none">
                    <asp:Label ID="lblNCB" runat="server" Text="<%$ Resources:CarInsurance,NCB%>" />
                    <asp:DropDownList ID="ddlNCB" Width="70px" runat="server" CssClass="assumption-field">
                        <asp:ListItem Text="<%$ Resources:CarInsurance,Select%>" Value="-1"></asp:ListItem>
                        <asp:ListItem Text="0" Value="0"></asp:ListItem>
                        <asp:ListItem Text="20" Selected="True" Value="20"></asp:ListItem>
                        <asp:ListItem Text="30" Value="30"></asp:ListItem>
                        <asp:ListItem Text="40" Value="40"></asp:ListItem>
                        <asp:ListItem Text="50" Value="50"></asp:ListItem>
                    </asp:DropDownList>
                    %
                    <asp:HiddenField runat="server" ID="hidNCBClaim" />
                    <asp:RequiredFieldValidator CssClass="validationError" ID="rfvNCB" Enabled="true"
                        runat="server" InitialValue="-1" ControlToValidate="ddlNCB" ErrorMessage="" ValidationGroup="cardetail"></asp:RequiredFieldValidator></div>
                <div id="divDriver" runat="server">
                    <asp:UpdatePanel ID="updDriver" EnableViewState="true" runat="server">
                        <ContentTemplate>
                            <div runat="server" id="divSpecifyDriver" visible="true">
                                <asp:Label ID="lblSpecifyNamedDriver" runat="server" Text="<%$ Resources:CarInsurance,SpecifyNamedDriver%>" />
                                <asp:RadioButton AutoPostBack="true" ID="rdoYesAddDriver" CausesValidation="false"
                                    runat="server" GroupName="adddriver" OnCheckedChanged="rdoYesAddDriver_CheckedChanged" />
                                <asp:Label ID="lblYesAddDriver" runat="server" Text="<%$ Resources:CarInsurance,Option_YesSpecify%>"></asp:Label>&nbsp;
                                <asp:RadioButton AutoPostBack="true" ID="rdoNoAddDriver" CausesValidation="false"
                                    Checked="true" runat="server" GroupName="adddriver" OnCheckedChanged="rdoNoAddDriver_CheckedChanged" />
                                <asp:Label ID="lblNoAddDriver" runat="server" Text="<%$ Resources:CarInsurance,Option_NoSpecify%>"></asp:Label><div
                                    style="display: none">
                                    <asp:TextBox ID="txtAddDriver" runat="server"></asp:TextBox></div>
                                <asp:RequiredFieldValidator CssClass="validationError" ID="rfvAddDriver" runat="server"
                                    ControlToValidate="txtAddDriver" ErrorMessage="" ValidationGroup="cardetail"
                                    Display="Dynamic"></asp:RequiredFieldValidator></div>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    <asp:UpdatePanel ID="uplDriverList" EnableViewState="true" runat="server">
                        <ContentTemplate>
                            <div id="divAddDriver" runat="server">
                                <asp:Label ID="lblNoOfAdditionalDrivers" runat="server" Text="<%$ Resources:CarInsurance,NoOfNamedDrivers%>" />
                                <asp:DropDownList CausesValidation="false" AutoPostBack="true" CssClass="assumption-field"
                                    ID="ddlDriverCount" runat="server" OnSelectedIndexChanged="ddlDriverCount_SelectedIndexChanged">
                                    <asp:ListItem>1</asp:ListItem>
                                    <asp:ListItem>2</asp:ListItem>
                                </asp:DropDownList>
                                <asp:RequiredFieldValidator CssClass="validationError" ID="rfvNoOfDriver" runat="server"
                                    ControlToValidate="ddlDriverCount" InitialValue="-1" ErrorMessage="" ValidationGroup="cardetail"></asp:RequiredFieldValidator></div>
                            <asp:Panel ID="pnlDriver" runat="server" Width="100%">
                                <div id="divDriver1" runat="server">
                                    <asp:Label ID="Label1" runat="server" Text="<%$ Resources:CarInsurance,DOB%>" />
                                    <asp:HiddenField ID="hdnDriverId1" runat="server" Value="0" />
                                    <asp:DropDownList ID="ddlDriver1Day" runat="server" CssClass="assumption-field-2"
                                        Width="80px">
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="rfvDriver1Day" ControlToValidate="ddlDriver1Day"
                                        runat="server" CssClass="validationError" ValidationGroup="cardetail" ErrorMessage=""
                                        InitialValue="-1"></asp:RequiredFieldValidator><asp:DropDownList ID="ddlDriver1Month"
                                            runat="server" CssClass="assumption-field-2" Width="100px">
                                            <asp:ListItem Value="-1" Text="<%$ Resources:General,Month%>"></asp:ListItem>
                                            <asp:ListItem Value="1" Text="<%$ Resources:MonthResource,January%>" />
                                            <asp:ListItem Value="2" Text="<%$ Resources:MonthResource,February%>" />
                                            <asp:ListItem Value="3" Text="<%$ Resources:MonthResource,March%>" />
                                            <asp:ListItem Value="4" Text="<%$ Resources:MonthResource,April%>" />
                                            <asp:ListItem Value="5" Text="<%$ Resources:MonthResource,May%>" />
                                            <asp:ListItem Value="6" Text="<%$ Resources:MonthResource,June%>" />
                                            <asp:ListItem Value="7" Text="<%$ Resources:MonthResource,July%>" />
                                            <asp:ListItem Value="8" Text="<%$ Resources:MonthResource,August%>" />
                                            <asp:ListItem Value="9" Text="<%$ Resources:MonthResource,September%>" />
                                            <asp:ListItem Value="10" Text="<%$ Resources:MonthResource,October%>" />
                                            <asp:ListItem Value="11" Text="<%$ Resources:MonthResource,November%>" />
                                            <asp:ListItem Value="12" Text="<%$ Resources:MonthResource,December%>" />
                                        </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="rfvDriver1Month" ControlToValidate="ddlDriver1Month"
                                        runat="server" CssClass="validationError" ValidationGroup="cardetail" ErrorMessage=""
                                        InitialValue="-1"></asp:RequiredFieldValidator><asp:DropDownList ID="ddlDriver1Year"
                                            runat="server" CssClass="assumption-field-2" Width="80px">
                                        </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="rfvDriver1Year" ControlToValidate="ddlDriver1Year"
                                        runat="server" CssClass="validationError" ValidationGroup="cardetail" ErrorMessage=""
                                        InitialValue="-1"></asp:RequiredFieldValidator></div>
                                <div id="divDriver2" runat="server" style="display: none;">
                                    <asp:Label ID="Label2" runat="server" Text="<%$ Resources:CarInsurance,DOB%>" />
                                    <asp:HiddenField ID="hdnDriverId2" runat="server" Value="0" />
                                    <asp:DropDownList ID="ddlDriver2Day" runat="server" CssClass="assumption-field-2"
                                        Width="80px">
                                    </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="rfvDriver2Day" ControlToValidate="ddlDriver2Day"
                                        runat="server" CssClass="validationError" ValidationGroup="cardetail" ErrorMessage=""
                                        InitialValue="-1"></asp:RequiredFieldValidator><asp:DropDownList ID="ddlDriver2Month"
                                            runat="server" CssClass="assumption-field-2" Width="100px">
                                            <asp:ListItem Value="-1" Text="<%$ Resources:General,Month%>"></asp:ListItem>
                                            <asp:ListItem Value="1" Text="<%$ Resources:MonthResource,January%>" />
                                            <asp:ListItem Value="2" Text="<%$ Resources:MonthResource,February%>" />
                                            <asp:ListItem Value="3" Text="<%$ Resources:MonthResource,March%>" />
                                            <asp:ListItem Value="4" Text="<%$ Resources:MonthResource,April%>" />
                                            <asp:ListItem Value="5" Text="<%$ Resources:MonthResource,May%>" />
                                            <asp:ListItem Value="6" Text="<%$ Resources:MonthResource,June%>" />
                                            <asp:ListItem Value="7" Text="<%$ Resources:MonthResource,July%>" />
                                            <asp:ListItem Value="8" Text="<%$ Resources:MonthResource,August%>" />
                                            <asp:ListItem Value="9" Text="<%$ Resources:MonthResource,September%>" />
                                            <asp:ListItem Value="10" Text="<%$ Resources:MonthResource,October%>" />
                                            <asp:ListItem Value="11" Text="<%$ Resources:MonthResource,November%>" />
                                            <asp:ListItem Value="12" Text="<%$ Resources:MonthResource,December%>" />
                                        </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="rfvDriver2Month" ControlToValidate="ddlDriver2Month"
                                        runat="server" CssClass="validationError" ValidationGroup="cardetail" ErrorMessage=""
                                        InitialValue="-1"></asp:RequiredFieldValidator><asp:DropDownList ID="ddlDriver2Year"
                                            runat="server" CssClass="assumption-field-2" Width="80px">
                                        </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="rfvDriver2Year" ControlToValidate="ddlDriver2Year"
                                        runat="server" CssClass="validationError" ValidationGroup="cardetail" ErrorMessage=""
                                        InitialValue="-1"></asp:RequiredFieldValidator></div>
                            </asp:Panel>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                </div>
            </div>
        </div>

        <script type="text/javascript">
            function ShowHideDiv(divName, varOnOff) {
                if (varOnOff) {
                    document.getElementById(divName).style.display = "";
                }
                else {
                    document.getElementById(divName).style.display = "none";
                }
            }
            function showhide(divName) {

                el = document.getElementById(divName);
                el.style.display = (el.style.display == "none") ? "" : "none";

            }
        </script>

        <script type="text/javascript">
            function pageLoad(sender, args) {
                if (args.get_isPartialLoad()) // executes the code after asynchronous postbacks.
                {
                    bindClickEvent();
                }
                else // for postback
                {
                    bindClickEvent();
                }
                var ispromo = $('#<%=hdnIsPromo.ClientID%>').val();
                if (ispromo == "1") {
                    $('#divQSDisplay').css("background-image", "url(/images/img-cny-result-chac.jpg)");
                    $('#divEQDisplay').css("background-image", "url(/images/img-cny-result-chac.jpg)");
                }
            }
            function bindClickEvent() {
                $(".search-box-expand-btn").click(function() {
                    $header = $(this);
                    $content = $header.parent().find(".content");
                    if ($content.is(":hidden")) {
                        $(".content").slideUp(500);
                        $content.slideToggle(500, function() {
                            //execute this after slideToggle is done
                        });
                    }
                    else {
                        $(".content").slideUp(500);
                    }

                });
            }
        
        </script>

        <script type="text/javascript">
            function SetDisplay(val) {
                if (val == "10") {
                    //document.getElementById('<=rdoNoCTPL.ClientID>').checked = true;
                    ShowHideDiv('divGarageType', true);
                    //                ShowHideDiv('divYesAccMod', true);
                    //                ShowHideDiv('divProvinceofRegistration', true);
                    //                ShowHideDiv('divAnyClaimLastYear', true);
                    //                ShowHideDiv('divDriver', false);
                    ShowHideDiv('divDeduct', true);
                    ShowHideDiv('divCTPL', true);
                    document.getElementById('<%=ddlNCB.ClientID%>').value = "50";
                }
                else if (val == "21" || val == "31") {
                    //document.getElementById('<=rdoNoCTPL.ClientID>').checked = true;
                    ShowHideDiv('divGarageType', true);
                    //                ShowHideDiv('divYesAccMod', false);
                    //                ShowHideDiv('divProvinceofRegistration', false);
                    //                ShowHideDiv('divAnyClaimLastYear', false);
                    //                ShowHideDiv('divDriver', false);
                    ShowHideDiv('divDeduct', true);
                    ShowHideDiv('divCTPL', true);

                }
                else {
                    ShowHideDiv('divGarageType', false);
                    //                ShowHideDiv('divYesAccMod', false);
                    //                ShowHideDiv('divProvinceofRegistration', false);
                    //                ShowHideDiv('divAnyClaimLastYear', false);
                    //                ShowHideDiv('divDriver', false);
                    ShowHideDiv('divDeduct', false);
                    ShowHideDiv('divCTPL', true);
                }
            }

            function ClearNCB() {
                var select = document.getElementById('<%=ddlNCB.ClientID%>');
                if (select.options.length > 3) {
                    for (i = 0; i < select.options.length; i++) {
                        if (select.options[i].value == '30') {
                            select.options[i] = null;
                            break;
                        }
                    }
                    for (i = 0; i < select.options.length; i++) {
                        if (select.options[i].value == '40') {
                            select.options[i] = null;
                            break;
                        }
                    }
                    for (i = 0; i < select.options.length; i++) {
                        if (select.options[i].value == '50') {
                            select.options[i] = null;
                            break;
                        }
                    }
                }
            }

            function SetClaimNCBYes(val) {
                if (val == true) {
                    var select = document.getElementById('<%=ddlNCB.ClientID%>');
                    if (select.options.length > 3) {
                        for (i = 0; i < select.options.length; i++) {
                            if (select.options[i].value == '30') {
                                select.options[i] = null;
                                break;
                            }
                        }
                        for (i = 0; i < select.options.length; i++) {
                            if (select.options[i].value == '40') {
                                select.options[i] = null;
                                break;
                            }
                        }
                        for (i = 0; i < select.options.length; i++) {
                            if (select.options[i].value == '50') {
                                select.options[i] = null;
                                break;
                            }
                        }
                    }
                    document.getElementById('<%=ddlNCB.ClientID%>').value = "0";
                }
            }

            function SetClaimNCBNo(val) {
                if (val == true) {
                    var select = document.getElementById('<%=ddlNCB.ClientID%>');
                    if (select.options.length == 3) {
                        var opt1 = document.createElement("option");
                        opt1.text = '30';
                        opt1.value = '30';
                        select.options.add(opt1);

                        var opt2 = document.createElement("option");
                        opt2.text = '40';
                        opt2.value = '40';
                        select.options.add(opt2);

                        var opt3 = document.createElement("option");
                        opt3.text = '50';
                        opt3.value = '50';
                        select.options.add(opt3);
                    }

                    document.getElementById('<%=ddlNCB.ClientID%>').value = "50";
                }
            }


            var pbControl = null;
            var prm = Sys.WebForms.PageRequestManager.getInstance();
            prm.add_initializeRequest(InitializeRequest);
            prm.add_beginRequest(BeginRequestHandler);
            prm.add_endRequest(EndRequest);
            var postBackElement;
            function InitializeRequest(sender, args) {
                if (prm.get_isInAsyncPostBack())
                    args.set_cancel(true);
                postBackElement = args.get_postBackElement();
                OnOffUpdateProgress(true);
            }

            function OnOffUpdateProgress(onOff) {
                document.getElementById('<%=ddlInsuranceType.ClientID%>').isdisabled = onOff;
                document.getElementById('<%=ddlManufactYear.ClientID%>').isdisabled = onOff;
                document.getElementById('<%=ddlCarMake.ClientID%>').isdisabled = onOff;
                document.getElementById('<%=ddlModelBodyCCDoor.ClientID%>').isdisabled = onOff;
                document.getElementById('<%=ddlVehicleType.ClientID%>').isdisabled = onOff;
                if (document.getElementById('<%=rdoYesAccMod.ClientID%>') != null)
                    document.getElementById('<%=rdoYesAccMod.ClientID%>').isdisabled = onOff;
                if (document.getElementById('<%=rdoNoAccMod.ClientID%>') != null)
                    document.getElementById('<%=rdoNoAccMod.ClientID%>').isdisabled = onOff;
                if (document.getElementById('<%=txtAccModAmount.ClientID%>') != null)
                    document.getElementById('<%=txtAccModAmount.ClientID%>').isdisabled = onOff;
                if (document.getElementById('<%=rdoYesAddDriver.ClientID%>') != null)
                    document.getElementById('<%=rdoYesAddDriver.ClientID%>').isdisabled = onOff;
                if (document.getElementById('<%=rdoNoAddDriver.ClientID%>') != null)
                    document.getElementById('<%=rdoNoAddDriver.ClientID%>').isdisabled = onOff;
                if (document.getElementById('<%=ddlDriverCount.ClientID%>') != null)
                    document.getElementById('<%=ddlDriverCount.ClientID%>').isdisabled = onOff;
            }

            function BeginRequestHandler(sender, args) {
                pbControl = document.getElementById('<%=btnNext.ClientID%>');  //the control causing the postback 
                pbControl.disabled = true;
            }

            function EndRequest(sender, args) {
                if (postBackElement.id == '<%=ddlInsuranceType.ClientID%>'
                    || postBackElement.id == '<%=ddlManufactYear.ClientID%>'
                    || postBackElement.id == '<%=ddlCarMake.ClientID%>'
                    || postBackElement.id == '<%=ddlModelBodyCCDoor.ClientID%>'
                    || postBackElement.id == '<%=rdoYesClaimLastYear.ClientID%>'
                    || postBackElement.id == '<%=rdoNoClaimLastYear.ClientID%>'
                    || postBackElement.id == '<%=rdoYesAddDriver.ClientID%>'
                    || postBackElement.id == '<%=rdoNoAddDriver.ClientID%>'
                    || postBackElement.id == '<%=ddlVehicleType.ClientID%>'
                    || postBackElement.id == '<%=ddlDriverCount.ClientID%>') {
                    CheckAccMod();
                    OnOffUpdateProgress(false);
                    //JT_init();
                }
                pbControl.disabled = false;
                pbControl = null;
            }

            window.onload = function() {
                CheckAccMod();
                ShowCompareButton();
                if (document.getElementById('<%=hidNCBClaim.ClientID%>').value == '1') {
                    document.getElementById('<%=hidNCBClaim.ClientID%>').value = '';
                    ClearNCB();
                }
            }

            var CarMakeModel;
            var ArrCarMakeModel;

            function CarMakeClientValidate(source, arguments) {
                if (arguments.Value == -1) {
                    arguments.IsValid = false;
                } else {
                    arguments.IsValid = true;
                }
            }

            function CarModelClientValidate(source, arguments) {
                if (arguments.Value == -1) {
                    arguments.IsValid = false;
                } else {
                    arguments.IsValid = true;
                }
            }

            function ShowHideAccMod(varOnOff) {
                if (varOnOff == true) {
                    ShowHideDiv('divAccModAmount', true);
                }
                else {
                    ShowHideDiv('divAccModAmount', false);
                }
                //document.getElementById('divAccModAmount').style.display = varOnOff == true ? '' : 'none';
                //document.getElementById('<divAccModAmount.ClientID>').style.display = varOnOff == true ? '' : 'none';
                ValidatorEnable(document.getElementById('<%=rfvAccModAmount.ClientID%>'), varOnOff);
                ValidatorEnable(document.getElementById('<%=revAccModAmount.ClientID%>'), varOnOff);
                ValidatorEnable(document.getElementById('<%=csvAccModAmount.ClientID%>'), varOnOff);
            }

            function CheckOptionValidationCss() {
                CheckClaimValidationCss();
                CheckCTPLValidationCss();
                CheckAccModValidationCss();
                //alert(document.getElementById('<%=divSpecifyDriver.ClientID%>'));
                if (document.getElementById('<%=divSpecifyDriver.ClientID%>') != null) {
                    CheckAddDriverValidationCss();
                }
            }

            //CAR POLICY DETAILS HERE

            function CheckAccModAmount(source, arguments) {
                var _retValue = true;
                var _amount = parseInt(document.getElementById("<%=txtAccModAmount.ClientID%>").value);
                //alert(_amount);
                var txtSumInsured = document.getElementById("<%=txtSumInsured.ClientID%>");
                var lblSumInsured = document.getElementById("<%=lblSumInsured.ClientID%>");
                var txtNewSumInsured = document.getElementById("<%=txtNewSumInsured.ClientID%>");
                var _sumAmount = txtSumInsured.value;
                if (_sumAmount != null) {
                    if (_sumAmount <= 0) {
                        _sumAmount = 0;
                    }
                }
                else {
                    _sumAmount = 0;
                }

                //alert(_sumAmount);
                if (_sumAmount > 0 && _amount > 0) {
                    if (_amount > 100000) {
                        //alert("Accessary or Modifications Amount should NOT be greater than 100,000\nor 10% of Sum Insured Amount");
                        //alert("Invalid amount!");
                        _retValue = false;
                    }
                    else if (_amount > (_sumAmount * 0.1)) {
                        //alert("Accessary or Modifications Amount should NOT be greater than 100,000or 10% of Sum Insured Amount");
                        //alert("Invalid amount!");
                        _retValue = false;
                    }
                    else if (_amount < 1000) {
                        //alert("Accessories or Modifications amount should be greater than or equal 1000.");

                        _retValue = false;
                    }

                    if (_retValue == true) {
                        txtNewSumInsured.value = parseInt(txtSumInsured.value) + parseInt(_amount);
                        if (lblSumInsured != null)
                            lblSumInsured.innerHTML = addCommas(txtNewSumInsured.value.toString());
                    }
                }
                else {
                    _retValue = false;
                    //alert("Please select car model first.");
                }

                arguments.IsValid = _retValue;
            }

            function CheckCTPLValidationCss() {
                var ctrlDivYes = 'divYesCTPL';
                var ctrlDivNo = 'divNoCTPL';
                var txtText = '<%=txtCTPL.ClientID%>';
                var valCtrl = '<%=rfvCTPL.ClientID%>';
                ShowValidationEffectOption(ctrlDivYes, ctrlDivNo, txtText, valCtrl);
                return true;
            }

            function CheckAccModValidationCss() {
                var ctrlDivYes = 'divYesAccMod';
                var ctrlDivNo = 'divNoAccMod';
                var txtText = '<%=txtAccMod.ClientID%>';
                var valCtrl = '<%=rfvAccMod.ClientID%>';
                ShowValidationEffectOption(ctrlDivYes, ctrlDivNo, txtText, valCtrl);
                return true;
            }

            function CheckClaimValidationCss() {
                var ctrlDivYes = 'divYesClaimLastYear';
                var ctrlDivNo = 'divNoClaimLastYear';
                var txtText = '<%=txtAnyClaim.ClientID%>';
                var valCtrl = '<%=rfvAnyClaim.ClientID%>';
                ShowValidationEffectOption(ctrlDivYes, ctrlDivNo, txtText, valCtrl);
                return true;
            }

            function CheckAddDriverValidationCss() {
                var ctrlDivYes = 'divYesAddDriver';
                var ctrlDivNo = 'divNoAddDriver';
                var txtText = '<%=txtAddDriver.ClientID%>';
                var valCtrl = '<%=rfvAddDriver.ClientID%>';
                ShowValidationEffectOption(ctrlDivYes, ctrlDivNo, txtText, valCtrl);
                return true;
            }

            function CheckRedPlate() {
                var ctrlTxt = document.getElementById('<=txtRedPlate.ClientID>');
                var ctrlY = document.getElementById('<=rdoYesRedPlate.ClientID>');
                var ctrlN = document.getElementById('<=rdoNoRedPlate.ClientID>');
                var valCtrl = document.getElementById('<=rfvRedPlate.ClientID>');

                if (ctrlY != null && ctrlN != null) {
                    if (ctrlY.checked == true || ctrlN.checked == true) {
                        ctrlTxt.value = '1';
                        valCtrl.style.visibility = 'hidden';
                    }
                    else {
                        ctrlTxt.value = '';
                    }
                }
            }

            function CheckClaim() {
                var ctrlTxt = document.getElementById('<%=txtAnyClaim.ClientID%>');
                var ctrlY = document.getElementById('<%=rdoYesClaimLastYear.ClientID%>');
                var ctrlN = document.getElementById('<%=rdoNoClaimLastYear.ClientID%>');
                var valCtrl = document.getElementById('<%=rfvAnyClaim.ClientID%>');

                if (ctrlY != null && ctrlN != null) {
                    if (ctrlY.checked == true || ctrlN.checked == true) {
                        ctrlTxt.value = '1';
                        valCtrl.style.visibility = 'hidden';
                    }
                    else {
                        ctrlTxt.value = '';
                    }
                }
            }

            function CheckCTPL() {
                var ctrlTxt = document.getElementById('<%=txtCTPL.ClientID%>');
                var ctrlY = document.getElementById('<%=rdoYesCTPL.ClientID%>');
                var ctrlN = document.getElementById('<%=rdoNoCTPL.ClientID%>');
                var valCtrl = document.getElementById('<%=rfvCTPL.ClientID%>');

                if (ctrlY != null && ctrlN != null) {
                    if (ctrlY.checked == true || ctrlN.checked == true) {
                        ctrlTxt.value = '1';
                        valCtrl.style.visibility = 'hidden';
                    }
                    else {
                        ctrlTxt.value = '';
                    }
                }
            }

            function CheckAccMod() {

                var ctrlTxt = document.getElementById('<%=txtAccMod.ClientID%>');
                var ctrlY = document.getElementById('<%=rdoYesAccMod.ClientID%>');
                var ctrlN = document.getElementById('<%=rdoNoAccMod.ClientID%>');
                var valCtrl = document.getElementById('<%=rfvAccMod.ClientID%>');
                var txtNewSumInsured = document.getElementById('<%=txtNewSumInsured.ClientID%>');
                var txtSumInsured = document.getElementById('<%=txtSumInsured.ClientID%>');
                var lblSumInsured = document.getElementById('<%=lblSumInsured.ClientID%>');
                var txtAccModAmount = document.getElementById('<%=txtAccModAmount.ClientID%>');

                if (ctrlY != null && ctrlN != null) {
                    if (ctrlY.checked == true || ctrlN.checked == true) {
                        ctrlTxt.value = '1';
                        valCtrl.style.visibility = 'hidden';
                        if (ctrlY.checked == true) {
                            ShowHideAccMod(true);
                            if (lblSumInsured != null)
                                lblSumInsured.innerHTML = addCommas(txtNewSumInsured.value.toString());
                        }
                        else {
                            ShowHideAccMod(false);
                            txtAccModAmount.value = "0";
                            txtNewSumInsured.value = txtSumInsured.value;
                            //alert(_SumInsured.toString());
                            if (lblSumInsured != null)
                                lblSumInsured.innerHTML = addCommas(txtSumInsured.value.toString());
                        }
                    }
                    else {
                        ctrlTxt.value = '';
                        ShowHideAccMod(false);
                    }
                }
            }

            function addCommas(nStr) {
                nStr += '';
                var x = nStr.split('.');
                var x1 = x[0];
                var x2 = x.length > 1 ? '.' + x[1] : '';
                var rgx = /(\d+)(\d{3})/;
                while (rgx.test(x1)) {
                    x1 = x1.replace(rgx, '$1' + ',' + '$2');
                }
                return x1 + x2;
            }

            function CheckAddDriver() {
                //alert('CheckAddDriver');
                var ctrlTxt = document.getElementById('<%=txtAddDriver.ClientID%>');
                var ctrlY = document.getElementById('<%=rdoYesAddDriver.ClientID%>');
                var ctrlN = document.getElementById('<%=rdoNoAddDriver.ClientID%>');
                var valCtrl = document.getElementById('<%=rfvAddDriver.ClientID%>');
                var ddlDrvCount = document.getElementById('<%=ddlDriverCount.ClientID%>');
                var divAddDriver = document.getElementById('<%=divAddDriver.ClientID%>');

                if (ctrlY.checked == true || ctrlN.checked == true) {
                    ctrlTxt.value = '1';
                    valCtrl.style.visibility = 'hidden';
                }
                else {
                    ctrlTxt.value = '';
                }

                if (ctrlY.checked == true) {
                    if (ddlDrvCount != null) {
                        ddlDrvCount.disabled = false;
                        //showhideDriver();
                    }
                    if (divAddDriver != null) divAddDriver.style.display = '';
                }
                else {
                    //ddlDrvCount.options(0).selected = true;
                    if (ddlDrvCount != null) {
                        ddlDrvCount.selectedIndex = 0;
                        ddlDrvCount.disabled = true;
                        //showhideDriver();
                    }
                    if (divAddDriver != null) divAddDriver.style.display = 'none';
                }
            }

            function CheckInsuranceType() {
                var ddlInsuranceType = document.getElementById("<%=ddlInsuranceType.ClientID%>");
                var divSumInsured = document.getElementById("divSumInsured");
                if (ddlInsuranceType.value >= 20) {
                    divSumInsured.style.display = 'none';
                }
                else {
                    divSumInsured.style.display = '';
                }
            }

            function ShowHideAll() {
                try {
                    CheckInsuranceType();
                }
                catch (ex) {
                    alert(ex.name + ' ' + ex.message);
                }
            }

            OnOffUpdateProgress(false);


            function SetResultToCompare(sender, name, valBtnId) {
                var oldStr = document.getElementById('<%=hidStrResultCompare.ClientID%>').value;
                var oldButt = document.getElementById('hidBtnCompareId').value;
                var oldLabel = document.getElementById('hidLblChkCompare').value;
                var newLbl = valBtnId.replace('btnCompare', 'spnChkCompare');


                // sender.innerText = 'fff';
                if (name != '') {
                    if ((',' + oldStr).indexOf(name) < 0 && oldStr.split(",").length >= 4) {
                        alert('<%= GetGlobalResourceObject("CarInsuranceResultPage","Compare4Items") %>');
                        sender.checked = false;
                        return;
                    }
                    if (('x' + oldStr).indexOf(name) != -1) {
                        var oldButtSplit = oldButt.split(",");
                        var olLabelSplit = oldLabel.split(",");
                        if (oldButtSplit.length > 2)
                            document.getElementById(valBtnId).style.display = 'none';
                        else if (oldButtSplit.length == 2) {
                            document.getElementById(oldButtSplit[0]).style.display = 'none';
                            document.getElementById(oldButtSplit[1]).style.display = 'none';
                            document.getElementById(olLabelSplit[0]).style.display = '';
                            document.getElementById(olLabelSplit[1]).style.display = '';
                        }
                        if (oldStr.indexOf(',' + name) != -1) {
                            oldStr = oldStr.replace(',' + name, '');
                            oldButt = oldButt.replace(',' + valBtnId, '');
                            oldLabel = oldLabel.replace(',' + newLbl, '');
                        }
                        else if (oldStr.indexOf(name + ',') != -1) {
                            oldStr = oldStr.replace(name + ',', '');
                            oldButt = oldButt.replace(valBtnId + ',', '');
                            oldLabel = oldLabel.replace(newLbl + ',', '');
                        }
                        else {
                            oldStr = '';
                            oldButt = '';
                            oldLabel = '';
                        }
                        document.getElementById(newLbl).style.display = '';
                    }
                    else {
                        if (oldButt != '')
                            oldButt = oldButt + "," + valBtnId;
                        else
                            oldButt = valBtnId;

                        if (oldStr != '')
                            oldStr = oldStr + "," + name;
                        else
                            oldStr = name;

                        if (oldLabel != '') {
                            oldLabel = oldLabel + "," + newLbl;
                            document.getElementById(newLbl).style.display = 'none';
                        }
                        else
                            oldLabel = newLbl;
                    }
                    document.getElementById('<%=hidStrResultCompare.ClientID%>').value = oldStr;
                    document.getElementById('hidBtnCompareId').value = oldButt;
                    document.getElementById('hidLblChkCompare').value = oldLabel;
                    ShowCompareButton();
                }
            }

            function ShowCompareButton() {
                var btnCId = document.getElementById('hidBtnCompareId').value.split(",");
                var labelSplit = document.getElementById('hidLblChkCompare').value.split(",");
                if (btnCId.length > 1) {
                    for (var i = 0; i < btnCId.length; i++) {
                        document.getElementById(btnCId[i]).style.display = '';
                        document.getElementById(labelSplit[i]).style.display = 'none';
                    }
                }
            }

            function ClearChkCompareHid() {

                document.getElementById('<%=hidStrResultCompare.ClientID%>').value = '';
                document.getElementById('hidBtnCompareId').value = '';
                document.getElementById('hidLblChkCompare').value = '';
            }
            function CheckAddDriverChange() {
                alert(document.getElementById('<%=divAddDriver.ClientID%>').visible);
                if (document.getElementById('<%=rdoYesAddDriver.ClientID%>').checkd == true) {
                    document.getElementById('<%=rdoNoAddDriver.ClientID%>').checkd = false;
                    document.getElementById('<%=txtAddDriver.ClientID%>').value = '1';
                    document.getElementById('<%=pnlDriver.ClientID%>').style.display = '';
                    document.getElementById('<%=divAddDriver.ClientID%>').style.display = '';
                    $("#<%=ddlDriverCount.ClientID%>").val('1');
                    document.getElementById('<%=divDriver1.ClientID%>').style.display = '';

                }
                else {
                    //alert('ddd2');
                    if (document.getElementById('<%=rdoNoAddDriver.ClientID%>').checkd) {
                        document.getElementById('<%=rdoYesAddDriver.ClientID%>').checkd = false;
                        document.getElementById('<%=txtAddDriver.ClientID%>').value = '1';
                        document.getElementById('<%=pnlDriver.ClientID%>').style.display = 'none';
                        document.getElementById('<%=divAddDriver.ClientID%>').style.display = 'none';

                    }

                }
            }
            function CheckValidatorStatus() {
                var _InsType = document.getElementById('<%=ddlInsuranceType.ClientID%>');
                if (_InsType == 10) {
                    ValidatorEnable(document.getElementById('<%=rfvGarageType%>'), true);
                    ValidatorEnable(document.getElementById('<%=rfvManufactYear%>'), true);
                    ValidatorEnable(document.getElementById('<%=rfvCarMake%>'), true);
                    ValidatorEnable(document.getElementById('<%=rfvModelBodyCCDoor%>'), true);
                    ValidatorEnable(document.getElementById('<%=rfvAccMod%>'), false);

                    var _YesAccMod = document.getElementById('<%=rdoYesAccMod.ClientID%>');
                    if (_YesAccMod.checked) {
                        ValidatorEnable(document.getElementById('<%=rfvAccModAmount%>'), false);
                        ValidatorEnable(document.getElementById('<%=revAccModAmount%>'), false);
                        ValidatorEnable(document.getElementById('<%=csvAccModAmount%>'), false);
                    }
                    else {
                        ValidatorEnable(document.getElementById('<%=rfvAccModAmount%>'), false);
                        ValidatorEnable(document.getElementById('<%=revAccModAmount%>'), false);
                        ValidatorEnable(document.getElementById('<%=csvAccModAmount%>'), false);
                    }
                    ValidatorEnable(document.getElementById('<%=rfvVehicleType%>'), false);

                    ValidatorEnable(document.getElementById('<%=rfvSumInsured%>'), false);
                    ValidatorEnable(document.getElementById('<%=revSumInsured%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvGroupNo%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvCTPL%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvName%>'), false);
                    ValidatorEnable(document.getElementById('<%=revName%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvEmail%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvEmailValid%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvMobile%>'), false);
                    ValidatorEnable(document.getElementById('<%=revMobile%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvOccupation%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvAnyClaim%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvNCB%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvAddDriver%>'), false);
                    var _YesAddDriver = document.getElementById('<%=rdoYesAddDriver.ClientID%>');
                    if (_YesAddDriver.checked) {
                        ValidatorEnable(document.getElementById('<%=rfvNoOfDriver%>'), false);
                        ValidatorEnable(document.getElementById('<%=rfvDriver1Day%>'), false);
                        ValidatorEnable(document.getElementById('<%=rfvDriver1Month%>'), false);
                        ValidatorEnable(document.getElementById('<%=rfvDriver1Year%>'), false);
                        var _DriverCount = document.getElementById('<%=ddlDriverCount.ClientID%>').value;
                        if (_DriverCount == 2) {
                            ValidatorEnable(document.getElementById('<%=rfvDriver2Day%>'), false);
                            ValidatorEnable(document.getElementById('<%=rfvDriver2Month%>'), false);
                            ValidatorEnable(document.getElementById('<%=rfvDriver2Year%>'), false);
                        }
                        else {
                            ValidatorEnable(document.getElementById('<%=rfvDriver2Day%>'), false);
                            ValidatorEnable(document.getElementById('<%=rfvDriver2Month%>'), false);
                            ValidatorEnable(document.getElementById('<%=rfvDriver2Year%>'), false);
                        }
                    }
                    else {
                        ValidatorEnable(document.getElementById('<%=rfvNoOfDriver%>'), false);
                        ValidatorEnable(document.getElementById('<%=rfvDriver1Day%>'), false);
                        ValidatorEnable(document.getElementById('<%=rfvDriver1Month%>'), false);
                        ValidatorEnable(document.getElementById('<%=rfvDriver1Year%>'), false);
                        ValidatorEnable(document.getElementById('<%=rfvDriver2Day%>'), false);
                        ValidatorEnable(document.getElementById('<%=rfvDriver2Month%>'), false);
                        ValidatorEnable(document.getElementById('<%=rfvDriver2Year%>'), false);
                    }
                }
                else if (_InsType == 21 || _InsType == 31) {
                    ValidatorEnable(document.getElementById('<%=rfvGarageType%>'), true);
                    ValidatorEnable(document.getElementById('<%=rfvManufactYear%>'), true);
                    ValidatorEnable(document.getElementById('<%=rfvCarMake%>'), true);
                    ValidatorEnable(document.getElementById('<%=rfvModelBodyCCDoor%>'), true);
                    ValidatorEnable(document.getElementById('<%=rfvAccMod%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvAccModAmount%>'), false);
                    ValidatorEnable(document.getElementById('<%=revAccModAmount%>'), false);
                    ValidatorEnable(document.getElementById('<%=csvAccModAmount%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvVehicleType%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvSumInsured%>'), false);
                    ValidatorEnable(document.getElementById('<%=revSumInsured%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvGroupNo%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvCTPL%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvName%>'), false);
                    ValidatorEnable(document.getElementById('<%=revName%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvEmail%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvEmailValid%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvMobile%>'), false);
                    ValidatorEnable(document.getElementById('<%=revMobile%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvOccupation%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvAnyClaim%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvNCB%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvAddDriver%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvNoOfDriver%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver1Day%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver1Month%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver1Year%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver2Day%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver2Month%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver2Year%>'), false);
                }
                else if (_InsType == 30) {
                    ValidatorEnable(document.getElementById('<%=rfvGarageType%>'), true);
                    ValidatorEnable(document.getElementById('<%=rfvManufactYear%>'), true);
                    ValidatorEnable(document.getElementById('<%=rfvCarMake%>'), true);
                    ValidatorEnable(document.getElementById('<%=rfvModelBodyCCDoor%>'), true);
                    ValidatorEnable(document.getElementById('<%=rfvAccMod%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvAccModAmount%>'), false);
                    ValidatorEnable(document.getElementById('<%=revAccModAmount%>'), false);
                    ValidatorEnable(document.getElementById('<%=csvAccModAmount%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvVehicleType%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvSumInsured%>'), false);
                    ValidatorEnable(document.getElementById('<%=revSumInsured%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvGroupNo%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvCTPL%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvName%>'), false);
                    ValidatorEnable(document.getElementById('<%=revName%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvEmail%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvEmailValid%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvMobile%>'), false);
                    ValidatorEnable(document.getElementById('<%=revMobile%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvOccupation%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvAnyClaim%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvNCB%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvAddDriver%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvNoOfDriver%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver1Day%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver1Month%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver1Year%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver2Day%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver2Month%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver2Year%>'), false);
                }
                else {
                    ValidatorEnable(document.getElementById('<%=rfvGarageType%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvManufactYear%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvCarMake%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvModelBodyCCDoor%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvAccMod%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvAccModAmount%>'), false);
                    ValidatorEnable(document.getElementById('<%=revAccModAmount%>'), false);
                    ValidatorEnable(document.getElementById('<%=csvAccModAmount%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvVehicleType%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvSumInsured%>'), false);
                    ValidatorEnable(document.getElementById('<%=revSumInsured%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvGroupNo%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvCTPL%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvName%>'), false);
                    ValidatorEnable(document.getElementById('<%=revName%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvEmail%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvEmailValid%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvMobile%>'), false);
                    ValidatorEnable(document.getElementById('<%=revMobile%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvOccupation%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvAnyClaim%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvNCB%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvAddDriver%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvNoOfDriver%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver1Day%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver1Month%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver1Year%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver2Day%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver2Month%>'), false);
                    ValidatorEnable(document.getElementById('<%=rfvDriver2Year%>'), false);
                }
            }

            function ShowHideDiv(diveName, varOnOff) {
                document.getElementById(diveName).style.display = varOnOff == true ? '' : 'none';
            }

            function EnableEditDetails() {
                document.getElementById("<%=txtNamePop.ClientID%>").disabled = false;
                document.getElementById("<%=txtMobilePop.ClientID%>").disabled = false;
                document.getElementById("<%=txtEmailPop.ClientID%>").disabled = false;

                document.getElementById("<%=txtNamePop.ClientID%>").className = "cb-fields";
                document.getElementById("<%=txtMobilePop.ClientID%>").className = "cb-fields";
                document.getElementById("<%=txtEmailPop.ClientID%>").className = "cb-fields";
            }

            function LeaveConfirm() {
                var _retVal = false;
                _retVal = confirm('<%=GetGlobalResourceObject("General", "ConfirmLeaving")%>');
                return _retVal;
            }
            
            function CheckedChanged() {
                var ctrlTxt = document.getElementById('<%=txtIsAccept.ClientID %>');
                var ctrlAgree = document.getElementById('<%=chkLoginAgreement.ClientID %>');
                var lblAgree = document.getElementById('<%=lblAgreement.ClientID %>');
                ctrlTxt.value = '1';
                lblAgree.setAttribute("class", "check-agree-text");
                if (ctrlAgree.checked == false) {
                    ctrlTxt.value = '';
                    lblAgree.setAttribute("class", "check-agree-text validationError");
                }
            }

            function ControlVisibleOnOff() {
                var insurancetype = $('#<%=ddlInsuranceType.ClientID%>').val();
                switch (insurancetype) {
                    case "0":
                    case "10":
                    case "21":
                    case "31":
                        $('#<%=divGarageType.ClientID%>').show();
                        $('#<%=divDeduct.ClientID%>').show();
                        $('#<%=divDriver.ClientID%>').hide();
                        $('#<%=divYesAccMod.ClientID%>').hide();
                        $('#<%=divCTPL.ClientID%>').show();
                        break;
                    case "30":
                        $('#<%=divGarageType.ClientID%>').hide();
                        $('#<%=divDeduct.ClientID%>').hide();
                        $('#<%=divDriver.ClientID%>').hide();
                        $('#<%=divYesAccMod.ClientID%>').hide();
                        $('#<%=divCTPL.ClientID%>').show();
                        break;
                }
            }
            function IsOneInsChecked()
            {
               var _retVal = true;
               var packageid = document.getElementById('<%=hidStrResultCompare.ClientID%>').value;
               var packageidSplit = packageid.split(",");
               if(packageid == '') {
                   //alert(packageid);
                 alert('<%= GetGlobalResourceObject("General","SelectPremium")%>');
                 _retVal = false;
               }
               else if(packageidSplit.length >= 2) {
                   //alert(packageid);
                 alert('<%= GetGlobalResourceObject("General","SelectPremium")%>');
                 _retVal = false;
               }      
               return _retVal;      
            }
            function CheckChkCompare()
            {
                var chkname = document.getElementById('<%=hidStrResultCompare.ClientID%>').value;
                var y = chkname.split(',')
                var i;
                for (i = 0; i < y.length; i++) 
                {    
                    var x = document.getElementsByName(y[i]);
                    //alert(x.type);
                     x.checked = true;
//                    if (x.type == "checkbox") 
//                    {
//                        
//                    }
                }
            }
        </script>

        <%= GetGlobalResourceObject("General", "ResultConversionTitle")%>

        <script type="text/javascript">
            /* <![CDATA[ */
            var google_conversion_id = 1013678288;
            var google_conversion_language = '<%= GetGlobalResourceObject("AdWords","language")%>';
            var google_conversion_format = "3";
            var google_conversion_color = "ffffff";
            var google_conversion_label = '<%= GetGlobalResourceObject("AdWords","google_conversion_label")%>';
            var google_conversion_value = 1.000000;
            var google_remarketing_only = false;
            /* ]]> */
        </script>

        <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"></script>

        <noscript>
            <div style="display: inline;">
                <img height="1" width="1" style="border-style: none;" alt="" src="<%=GetGlobalResourceObject ("AdWords","source" )%>" />
            </div>
        </noscript>
</asp:Content>
